this repo has no description
0
fork

Configure Feed

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

Merge branch 'main' into main

authored by

David St-Hilaire and committed by
GitHub
2d722167 798c7a55

+1750 -127
+1 -1
.github/workflows/build.yml
··· 685 685 runs-on: ubuntu-latest 686 686 strategy: 687 687 matrix: 688 - script: [lua, moon, fennel, ruby, js, wren, squirrel, wasm] 688 + script: [lua, moon, fennel, ruby, js, wren, squirrel, wasm, janet] 689 689 690 690 steps: 691 691 - name: Download Windows XP artifact
+3
.gitmodules
··· 79 79 [submodule "vendor/wasm3"] 80 80 path = vendor/wasm3 81 81 url = https://github.com/wasm3/wasm3.git 82 + [submodule "vendor/janet"] 83 + path = vendor/janet 84 + url = https://github.com/janet-lang/janet.git
+79 -16
CMakeLists.txt
··· 23 23 OUTPUT_STRIP_TRAILING_WHITESPACE 24 24 ) 25 25 26 + 26 27 string(LENGTH "${RESULT_STRING}" LENGTH_RESULT_STRING) 27 28 28 29 if(${LENGTH_RESULT_STRING} EQUAL 0) ··· 321 322 ################################ 322 323 323 324 set(WASM_DIR ${THIRDPARTY_DIR}/wasm3/source) 324 - set(WASM_SRC 325 + set(WASM_SRC 325 326 ${WASM_DIR}/m3_bind.c 326 327 ${WASM_DIR}/m3_code.c 327 328 ${WASM_DIR}/m3_compile.c ··· 420 421 target_include_directories(duktape INTERFACE ${THIRDPARTY_DIR}/duktape/src) 421 422 422 423 ################################ 424 + # Janet 425 + ################################ 426 + 427 + set(BUILD_WITH_JANET_DEFAULT FALSE) 428 + 429 + option(BUILD_WITH_JANET "Janet Enabled" ${BUILD_WITH_JANET_DEFAULT}) 430 + message("BUILD_WITH_JANET: ${BUILD_WITH_JANET}") 431 + 432 + if(BUILD_WITH_JANET) 433 + if(MSVC) 434 + add_custom_command( 435 + OUTPUT ${THIRDPARTY_DIR}/janet/build/c/janet.c 436 + COMMAND ./build_win.bat 437 + WORKING_DIRECTORY ${THIRDPARTY_DIR}/janet/ 438 + ) 439 + else() 440 + add_custom_command( 441 + OUTPUT ${THIRDPARTY_DIR}/janet/build/c/janet.c 442 + COMMAND make build/c/janet.c 443 + WORKING_DIRECTORY ${THIRDPARTY_DIR}/janet/ 444 + ) 445 + endif() 446 + 447 + add_library(janet ${THIRDPARTY_DIR}/janet/build/c/janet.c) 448 + target_include_directories(janet PUBLIC ${THIRDPARTY_DIR}/janet/src/include) 449 + target_include_directories(janet PUBLIC ${CMAKE_SOURCE_DIR}/build/janet/) 450 + endif() 451 + 452 + ################################ 423 453 # TIC-80 core 424 454 ################################ 425 455 ··· 433 463 ${TIC80CORE_DIR}/core/io.c 434 464 ${TIC80CORE_DIR}/core/sound.c 435 465 ${TIC80CORE_DIR}/api/js.c 436 - ${TIC80CORE_DIR}/api/lua.c 437 - ${TIC80CORE_DIR}/api/moonscript.c 438 - ${TIC80CORE_DIR}/api/fennel.c 439 - ${TIC80CORE_DIR}/api/wren.c 466 + ${TIC80CORE_DIR}/api/lua.c 467 + ${TIC80CORE_DIR}/api/moonscript.c 468 + ${TIC80CORE_DIR}/api/fennel.c 469 + ${TIC80CORE_DIR}/api/wren.c 440 470 ${TIC80CORE_DIR}/api/wasm.c 441 471 ${TIC80CORE_DIR}/api/squirrel.c 442 472 ${TIC80CORE_DIR}/api/scheme.c 443 473 ${TIC80CORE_DIR}/api/mruby.c 474 + ${TIC80CORE_DIR}/api/janet.c 444 475 ${TIC80CORE_DIR}/tic.c 445 476 ${TIC80CORE_DIR}/cart.c 446 477 ${TIC80CORE_DIR}/tools.c ··· 482 513 target_link_libraries(tic80core${SCRIPT} mruby) 483 514 endif() 484 515 516 + if(BUILD_WITH_JANET) 517 + target_link_libraries(tic80core${SCRIPT} janet) 518 + endif() 519 + 485 520 if(${BUILD_DEPRECATED}) 486 521 target_compile_definitions(tic80core${SCRIPT} PRIVATE BUILD_DEPRECATED) 487 522 target_link_libraries(tic80core${SCRIPT} giflib) ··· 506 541 MACRO_CORE(wren TIC_BUILD_WITH_WREN FALSE) 507 542 MACRO_CORE(squirrel TIC_BUILD_WITH_SQUIRREL FALSE) 508 543 MACRO_CORE(scheme TIC_BUILD_WITH_SCHEME FALSE) 544 + MACRO_CORE(wasm TIC_BUILD_WITH_WASM FALSE) 545 + 509 546 if(BUILD_WITH_MRUBY) 510 547 MACRO_CORE(ruby TIC_BUILD_WITH_MRUBY FALSE) 511 548 endif() 512 - MACRO_CORE(wasm TIC_BUILD_WITH_WASM FALSE) 549 + 550 + if(BUILD_WITH_JANET) 551 + MACRO_CORE(janet TIC_BUILD_WITH_JANET FALSE) 552 + endif() 513 553 514 554 endif() 515 555 516 556 if(BUILD_WITH_MRUBY) 517 557 target_compile_definitions(tic80core PUBLIC TIC_BUILD_WITH_MRUBY=1) 558 + endif() 559 + 560 + if(BUILD_WITH_JANET) 561 + target_compile_definitions(tic80core PUBLIC TIC_BUILD_WITH_JANET=1) 518 562 endif() 519 563 520 564 ################################ ··· 664 708 if("${CMAKE_SYSTEM_NAME}" STREQUAL "NintendoWii" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "NintendoGameCube" OR GAMECUBE OR WII OR IS_DOS) 665 709 add_custom_command(TARGET tic80_libretro 666 710 POST_BUILD 667 - COMMAND ${CMAKE_SOURCE_DIR}/build/libretro/merge_static.sh $(AR) ${CMAKE_BINARY_DIR}/lib/tic80_libretro${LIBRETRO_SUFFIX}.${LIBRETRO_EXTENSION} ${CMAKE_BINARY_DIR}/lib/tic80_libretro_partial.a ${CMAKE_BINARY_DIR}/lib/libtic80core.a ${CMAKE_BINARY_DIR}/lib/liblua.a ${CMAKE_BINARY_DIR}/lib/libblipbuf.a ${CMAKE_BINARY_DIR}/lib/libduktape.a ${CMAKE_BINARY_DIR}/lib/libwren.a ${CMAKE_BINARY_DIR}/lib/libwasm.a ${CMAKE_BINARY_DIR}/lib/libsquirrel.a ${CMAKE_BINARY_DIR}/lib/libscheme.a ${CMAKE_BINARY_DIR}/lib/libgiflib.a ${CMAKE_BINARY_DIR}/lib/liblpeg.a ${CMAKE_BINARY_DIR}/lib/libzlib.a ${MRUBY_LIB}) 711 + COMMAND ${CMAKE_SOURCE_DIR}/build/libretro/merge_static.sh $(AR) ${CMAKE_BINARY_DIR}/lib/tic80_libretro${LIBRETRO_SUFFIX}.${LIBRETRO_EXTENSION} ${CMAKE_BINARY_DIR}/lib/tic80_libretro_partial.a ${CMAKE_BINARY_DIR}/lib/libtic80core.a ${CMAKE_BINARY_DIR}/lib/liblua.a ${CMAKE_BINARY_DIR}/lib/libblipbuf.a ${CMAKE_BINARY_DIR}/lib/libduktape.a ${CMAKE_BINARY_DIR}/lib/libwren.a ${CMAKE_BINARY_DIR}/lib/libwasm.a ${CMAKE_BINARY_DIR}/lib/libjanet.a ${CMAKE_BINARY_DIR}/lib/libsquirrel.a ${CMAKE_BINARY_DIR}/lib/libscheme.a ${CMAKE_BINARY_DIR}/lib/libgiflib.a ${CMAKE_BINARY_DIR}/lib/liblpeg.a ${CMAKE_BINARY_DIR}/lib/libzlib.a ${MRUBY_LIB}) 668 712 else() 669 713 add_custom_command(TARGET tic80_libretro 670 714 POST_BUILD 671 - COMMAND ${CMAKE_SOURCE_DIR}/build/libretro/merge_static.sh $(AR) ${CMAKE_BINARY_DIR}/lib/tic80_libretro${LIBRETRO_SUFFIX}.${LIBRETRO_EXTENSION} ${CMAKE_BINARY_DIR}/lib/tic80_libretro_partial.a ${CMAKE_BINARY_DIR}/lib/libtic80core.a ${CMAKE_BINARY_DIR}/lib/liblua.a ${CMAKE_BINARY_DIR}/lib/libblipbuf.a ${CMAKE_BINARY_DIR}/lib/libduktape.a ${CMAKE_BINARY_DIR}/lib/libwren.a ${CMAKE_BINARY_DIR}/lib/libwasm.a ${CMAKE_BINARY_DIR}/lib/libsquirrel.a ${CMAKE_BINARY_DIR}/lib/libscheme.a ${CMAKE_BINARY_DIR}/lib/libgiflib.a ${CMAKE_BINARY_DIR}/lib/liblpeg.a ${MRUBY_LIB}) 715 + COMMAND ${CMAKE_SOURCE_DIR}/build/libretro/merge_static.sh $(AR) ${CMAKE_BINARY_DIR}/lib/tic80_libretro${LIBRETRO_SUFFIX}.${LIBRETRO_EXTENSION} ${CMAKE_BINARY_DIR}/lib/tic80_libretro_partial.a ${CMAKE_BINARY_DIR}/lib/libtic80core.a ${CMAKE_BINARY_DIR}/lib/liblua.a ${CMAKE_BINARY_DIR}/lib/libblipbuf.a ${CMAKE_BINARY_DIR}/lib/libduktape.a ${CMAKE_BINARY_DIR}/lib/libwren.a ${CMAKE_BINARY_DIR}/lib/libwasm.a ${CMAKE_BINARY_DIR}/lib/libsquirrel.a ${CMAKE_BINARY_DIR}/lib/libscheme.a ${CMAKE_BINARY_DIR}/lib/libjanet.a ${CMAKE_BINARY_DIR}/lib/libgiflib.a ${CMAKE_BINARY_DIR}/lib/liblpeg.a ${MRUBY_LIB}) 672 716 endif() 673 717 else() 674 718 add_library(tic80_libretro SHARED ··· 772 816 target_link_libraries(xplode m) 773 817 endif() 774 818 819 + set(DEMO_CARTS_IN ${CMAKE_SOURCE_DIR}/demos) 820 + set(DEMO_CARTS_OUT) 821 + 775 822 file(GLOB DEMO_CARTS 776 - ${CMAKE_SOURCE_DIR}/demos/*.* 777 - ${CMAKE_SOURCE_DIR}/demos/bunny/*.*) 823 + ${DEMO_CARTS_IN}/*.* 824 + ${DEMO_CARTS_IN}/bunny/*.*) 778 825 779 826 list(APPEND DEMO_CARTS 780 827 ${CMAKE_SOURCE_DIR}/config.lua 781 828 ) 782 829 783 - set(DEMO_CARTS_OUT) 830 + if(NOT BUILD_WITH_MRUBY) 831 + list(REMOVE_ITEM DEMO_CARTS ${DEMO_CARTS_IN}/rubydemo.rb) 832 + list(REMOVE_ITEM DEMO_CARTS ${DEMO_CARTS_IN}/bunny/rubymark.rb) 833 + endif() 834 + 835 + if(NOT BUILD_WITH_JANET) 836 + list(REMOVE_ITEM DEMO_CARTS ${DEMO_CARTS_IN}/janetdemo.janet) 837 + list(REMOVE_ITEM DEMO_CARTS ${DEMO_CARTS_IN}/bunny/janetmark.janet) 838 + endif() 784 839 785 840 foreach(CART_FILE ${DEMO_CARTS}) 786 841 ··· 800 855 801 856 # we need to build these separatly combining both the project 802 857 # and the external WASM binary chunk since projects do not 803 - # include BINARY chunks 804 - 858 + # include BINARY chunks 859 + 805 860 file(GLOB WASM_DEMOS 806 - ${CMAKE_SOURCE_DIR}/demos/wasm/*.wasmp 807 - ${CMAKE_SOURCE_DIR}/demos/bunny/wasmmark/*.wasmp 861 + ${DEMO_CARTS_IN}/wasm/*.wasmp 862 + ${DEMO_CARTS_IN}/bunny/wasmmark/*.wasmp 808 863 ) 809 864 810 865 foreach(CART_FILE ${WASM_DEMOS}) ··· 1266 1321 MACRO_STUB(wren) 1267 1322 MACRO_STUB(squirrel) 1268 1323 MACRO_STUB(scheme) 1269 - MACRO_STUB(ruby) 1324 + 1325 + if(BUILD_WITH_JANET) 1326 + MACRO_STUB(janet) 1327 + endif() 1328 + 1329 + if(BUILD_WITH_MRUBY) 1330 + MACRO_STUB(ruby) 1331 + endif() 1332 + 1270 1333 MACRO_STUB(wasm) 1271 1334 1272 1335 endif()
+8 -6
README.md
··· 19 19 [Moonscript](https://moonscript.org), 20 20 [Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript), 21 21 [Ruby](https://www.ruby-lang.org/en/), 22 - [Wren](http://wren.io/), [Fennel](https://fennel-lang.org), and 23 - [Squirrel](http://www.squirrel-lang.org). 22 + [Wren](http://wren.io/), 23 + [Fennel](https://fennel-lang.org), 24 + [Squirrel](http://www.squirrel-lang.org), and 25 + [Janet](https://janet-lang.org). 24 26 - Games can have mouse and keyboard as input 25 27 - Games can have up to 4 controllers as input (with up to 8 buttons, each) 26 28 - Built-in editors: for code, sprites, world maps, sound effects and music ··· 84 86 mingw32-make -j4 85 87 ``` 86 88 87 - ## Linux 89 + ## Linux 88 90 ### Ubuntu 14.04 89 91 run the following commands in the Terminal 90 92 ``` ··· 116 118 run the following commands in the Terminal 117 119 ``` 118 120 sudo dnf -y groupinstall "Development Tools" "Development Libraries" 119 - sudo dnf -y install ruby rubygem-{tk{,-doc},rake,test-unit} cmake libglvnd-devel libglvnd-gles freeglut-devel clang libXext-devel SDL_sound pipewire-devel pipewire-jack-audio-connection-kit-devel pulseaudio-libs-devel 121 + sudo dnf -y install ruby rubygem-{tk{,-doc},rake,test-unit} cmake libglvnd-devel libglvnd-gles freeglut-devel clang libXext-devel SDL_sound pipewire-devel pipewire-jack-audio-connection-kit-devel pulseaudio-libs-devel 120 122 git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build 121 123 cmake .. -DCMAKE_CXX_COMPILER=clang++ -DSDL_ALSA=On 122 124 make -j4 ··· 173 175 mkdir -p ~/Applications/TIC80dev.app/Contents/{MacOS,Resources} 174 176 cp -f macosx/tic80.plist ~/Applications/TIC80dev.app/Contents/Info.plist 175 177 cp -f macosx/tic80.icns ~/Applications/TIC80dev.app/Contents/Resources 176 - cat > ~/Applications/TIC80dev.app/MacOS/TIC80dev <<EOF 178 + cat > ~/Applications/TIC80dev.app/Contents/MacOS/TIC80dev <<EOF 177 179 #!/bin/sh 178 180 exec /Users/nesbox/projects/TIC-80/build/bin/tic80 --skip --scale 2 >/dev/null 179 181 EOF 180 - chmod +x ~/Applications/TIC80dev.app/MacOS/TIC80 182 + chmod +x ~/Applications/TIC80dev.app/Contents/MacOS/TIC80dev 181 183 ``` 182 184 Make sure to update the absolute path to the tic80 binary in the script, or 183 185 update the launch arguments.
+1 -1
build/assets/fenneldemo.tic.dat
··· 1 - 0x78, 0xda, 0xed, 0x51, 0xcf, 0x6b, 0x13, 0x41, 0x14, 0x9e, 0x14, 0xbc, 0x04, 0xf1, 0x2a, 0x88, 0x87, 0x67, 0xa1, 0xb8, 0x6b, 0x6b, 0x9a, 0x5f, 0x84, 0x9a, 0x88, 0x20, 0x2a, 0x5a, 0x88, 0x14, 0xb4, 0x98, 0x83, 0x04, 0xd9, 0x6e, 0x26, 0xcd, 0xe0, 0x76, 0x76, 0x9d, 0x9d, 0xa4, 0xc9, 0xc1, 0xab, 0xec, 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 0x33, 0x10, 0xf8, 0xdb, 0xa9, 0xc9, 0x4d, 0x8b, 0x53, 0x7d, 0x63, 0x25, 0x51, 0xdf, 0x84, 0x9b, 0xfc, 0x86, 0xbc, 0xaf, 0x78, 0x47, 0xd8, 0x69, 0x58, 0xd9, 0x6d, 0x87, 0xd3, 0x5f, 0x87, 0x36, 0x75, 0x03, 0x1c, 0xe7, 0xe4, 0xf7, 0x42, 0xc5, 0x1f, 0x7c, 0xbc, 0xa9, 0x94, 0x66, 0xc6, 0x2f, 0x69, 0x98, 0xb4, 0xc1, 0x6a, 0x85, 0xbf, 0x25, 0x64, 0x92, 0x15, 0x32, 0xfd, 0x0f, 0x68, 0x62, 0x7e, 0x0f,
+1 -1
build/assets/luamark.tic.dat
··· 1 - 0x78, 0xda, 0xed, 0x56, 0x4f, 0x6f, 0xe3, 0x44, 0x14, 0x77, 0x0f, 0x20, 0xc5, 0x22, 0x52, 0x73, 0x45, 0x1c, 0x9e, 0x16, 0x21, 0xec, 0x36, 0xcd, 0x3a, 0x6d, 0x37, 0xa0, 0x6c, 0x5b, 0x69, 0x17, 0xb4, 0xa2, 0xd2, 0x22, 0x21, 0xb6, 0x6c, 0xe9, 0xa1, 0x5a, 0x4d, 0xe3, 0x49, 0x63, 0xe1, 0x8c, 0xc3, 0x78, 0xdc, 0x34, 0x5a, 0x95, 0x23, 0x9f, 0x80, 0x0f, 0xc0, 0x09, 0xae, 0x70, 0xe2, 0xce, 0x0d, 0x29, 0x95, 0xfa, 0x01, 0xea, 0x6a, 0xf9, 0x00, 0x64, 0x39, 0x54, 0x70, 0x84, 0x37, 0xe3, 0xb1, 0x33, 0x4e, 0xb7, 0xdb, 0xae, 0x84, 0x04, 0x48, 0x1d, 0xe5, 0xb9, 0xe3, 0x37, 0xef, 0xfd, 0xde, 0xdf, 0x79, 0xee, 0x1b, 0x9e, 0x65, 0xbd, 0xf9, 0x56, 0x7d, 0xf7, 0xdd, 0xdd, 0x1f, 0x37, 0x1e, 0x3d, 0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0x99, 0x6f, 0x56, 0xf7, 0xf1, 0x16, 0xbe, 0xfa, 0x04, 0xeb, 0x58, 0x31, 0xd4, 0xd7, 0x4c, 0x55, 0x56, 0x9c, 0x56, 0xc3, 0x0a, 0x2c, 0x9c, 0xa1, 0xf2, 0x45, 0x79, 0x1b, 0x56, 0x5e, 0x0c, 0x25, 0xbd, 0xfe, 0x1b, 0x81, 0x60, 0xa3, 0x2d,
+36 -35
build/baremetalpi/Makefile
··· 13 13 TIC80STUDIOSRC = $(TIC80SRC)/studio 14 14 BAREMETALSYSTEM = $(TIC80SRC)/system/baremetalpi 15 15 16 - OBJS = \ 17 - $(BAREMETALSYSTEM)/main.o $(BAREMETALSYSTEM)/kernel.o $(BAREMETALSYSTEM)/customchargenerator.o \ 18 - $(BAREMETALSYSTEM)/customscreen.o $(BAREMETALSYSTEM)/utils.o $(BAREMETALSYSTEM)/gamepads.o 16 + OBJS = \ 17 + $(BAREMETALSYSTEM)/main.o $(BAREMETALSYSTEM)/kernel.o $(BAREMETALSYSTEM)/customchargenerator.o \ 18 + $(BAREMETALSYSTEM)/customscreen.o $(BAREMETALSYSTEM)/utils.o $(BAREMETALSYSTEM)/gamepads.o 19 19 20 20 include $(CIRCLEHOME)/Rules.mk 21 21 22 22 CFLAGS += -I "$(NEWLIBDIR)/include" -I $(STDDEF_INCPATH) -I $(CIRCLESTDLIB)/include -I $(TIC80HOME)/include -I $(TIC80SRC) \ 23 - -I $(TIC80STUDIOSRC) -I $(TIC80BUILD) -D BAREMETALPI 23 + -I $(TIC80STUDIOSRC) -I $(TIC80BUILD) -D BAREMETALPI 24 24 25 25 LIBS := \ 26 - $(TIC80LIB)/libtic80studio.a \ 27 - $(TIC80LIB)/libtic80core.a \ 28 - $(TIC80LIB)/libgiflib.a \ 29 - $(TIC80LIB)/liblpeg.a \ 30 - $(TIC80LIB)/liblua.a \ 31 - $(TIC80LIB)/libzip.a \ 32 - $(TIC80LIB)/libblipbuf.a \ 33 - $(TIC80LIB)/libsquirrel.a \ 34 - $(TIC80LIB)/libwren.a \ 35 - $(TIC80LIB)/libwasm.a \ 36 - $(TIC80LIB)/libargparse.a \ 37 - $(TIC80LIB)/libwave_writer.a \ 38 - $(TIC80LIB)/libduktape.a \ 39 - $(TIC80LIB)/libzlib.a \ 40 - $(TIC80LIB)/libpng.a \ 26 + $(TIC80LIB)/libtic80studio.a \ 27 + $(TIC80LIB)/libtic80core.a \ 28 + $(TIC80LIB)/libgiflib.a \ 29 + $(TIC80LIB)/liblpeg.a \ 30 + $(TIC80LIB)/liblua.a \ 31 + $(TIC80LIB)/libzip.a \ 32 + $(TIC80LIB)/libblipbuf.a \ 33 + $(TIC80LIB)/libsquirrel.a \ 34 + $(TIC80LIB)/libwren.a \ 35 + $(TIC80LIB)/libwasm.a \ 36 + $(TIC80LIB)/libargparse.a \ 37 + $(TIC80LIB)/libwave_writer.a \ 38 + $(TIC80LIB)/libduktape.a \ 39 + $(TIC80LIB)/libzlib.a \ 40 + $(TIC80LIB)/libpng.a \ 41 41 $(MRUBYDIR)/build/target/lib/libmruby.a \ 42 - $(NEWLIBDIR)/lib/libc.a \ 43 - $(NEWLIBDIR)/lib/libcirclenewlib.a \ 44 - $(CIRCLEHOME)/addon/vc4/sound/libvchiqsound.a \ 45 - $(CIRCLEHOME)/addon/vc4/vchiq/libvchiq.a \ 46 - $(CIRCLEHOME)/addon/linux/liblinuxemu.a \ 47 - $(CIRCLEHOME)/addon/SDCard/libsdcard.a \ 48 - $(CIRCLEHOME)/addon/fatfs/libfatfs.a \ 49 - $(CIRCLEHOME)/lib/usb/libusb.a \ 50 - $(CIRCLEHOME)/lib/input/libinput.a \ 51 - $(CIRCLEHOME)/lib/fs/fat/libfatfs.a \ 52 - $(CIRCLEHOME)/lib/fs/libfs.a \ 53 - $(CIRCLEHOME)/lib/net/libnet.a \ 54 - $(CIRCLEHOME)/lib/sched/libsched.a \ 55 - $(CIRCLEHOME)/lib/libcircle.a \ 56 - $(NEWLIBDIR)/lib/libm.a 42 + $(NEWLIBDIR)/lib/libc.a \ 43 + $(NEWLIBDIR)/lib/libcirclenewlib.a \ 44 + $(CIRCLEHOME)/addon/vc4/sound/libvchiqsound.a \ 45 + $(CIRCLEHOME)/addon/vc4/vchiq/libvchiq.a \ 46 + $(CIRCLEHOME)/addon/linux/liblinuxemu.a \ 47 + $(CIRCLEHOME)/addon/SDCard/libsdcard.a \ 48 + $(CIRCLEHOME)/addon/fatfs/libfatfs.a \ 49 + $(CIRCLEHOME)/lib/usb/libusb.a \ 50 + $(CIRCLEHOME)/lib/input/libinput.a \ 51 + $(CIRCLEHOME)/lib/fs/fat/libfatfs.a \ 52 + $(CIRCLEHOME)/lib/fs/libfs.a \ 53 + $(CIRCLEHOME)/lib/net/libnet.a \ 54 + $(CIRCLEHOME)/lib/sched/libsched.a \ 55 + $(CIRCLEHOME)/lib/libcircle.a \ 56 + $(NEWLIBDIR)/lib/libm.a 57 57 58 - # $(TIC80LIB)/libsquirrel.a \ 58 + # !TODO: temporary disabled janet script 59 + # $(TIC80LIB)/libjanet.a \
+68
build/janet/janetconf.h
··· 1 + /* This will be generated by the build system if this file is not used */ 2 + 3 + #ifndef JANETCONF_H 4 + #define JANETCONF_H 5 + 6 + #define JANET_VERSION_MAJOR 1 7 + #define JANET_VERSION_MINOR 26 8 + #define JANET_VERSION_PATCH 1 9 + #define JANET_VERSION_EXTRA "-dev" 10 + #define JANET_VERSION "1.26.1-dev" 11 + 12 + /* #define JANET_BUILD "local" */ 13 + 14 + /* These settings all affect linking, so use cautiously. */ 15 + #define JANET_SINGLE_THREADED 16 + #define JANET_NO_DYNAMIC_MODULES 17 + 18 + /* #define JANET_NO_NANBOX */ 19 + /* #define JANET_API __attribute__((visibility ("default"))) */ 20 + 21 + /* These settings should be specified before amalgamation is 22 + * built. Any build with these set should be considered non-standard, and 23 + * certain Janet libraries should be expected not to work. */ 24 + #define JANET_REDUCED_OS 25 + #define JANET_NO_ASSEMBLER 26 + #define JANET_NO_NET 27 + #define JANET_NO_FFI 28 + #define JANET_NO_FFI_JIT 29 + #define JANET_NO_EV 30 + #define JANET_NO_THREADS 31 + 32 + /* #define JANET_NO_DOCSTRINGS */ 33 + /* #define JANET_NO_SOURCEMAPS */ 34 + /* #define JANET_NO_PEG */ 35 + /* #define JANET_NO_INT_TYPES */ 36 + /* #define JANET_NO_REALPATH */ 37 + /* #define JANET_NO_SYMLINKS */ 38 + /* #define JANET_NO_UMASK */ 39 + /* #define JANET_NO_PROCESSES */ 40 + 41 + /* Other settings */ 42 + /* #define JANET_DEBUG */ 43 + /* #define JANET_PRF */ 44 + /* #define JANET_NO_UTC_MKTIME */ 45 + /* #define JANET_OUT_OF_MEMORY do { printf("janet out of memory\n"); exit(1); } while (0) */ 46 + /* #define JANET_EXIT(msg) do { printf("C assert failed executing janet: %s\n", msg); exit(1); } while (0) */ 47 + /* #define JANET_TOP_LEVEL_SIGNAL(msg) call_my_function((msg), stderr) */ 48 + /* #define JANET_RECURSION_GUARD 1024 */ 49 + /* #define JANET_MAX_PROTO_DEPTH 200 */ 50 + /* #define JANET_MAX_MACRO_EXPAND 200 */ 51 + /* #define JANET_STACK_MAX 16384 */ 52 + /* #define JANET_OS_NAME my-custom-os */ 53 + /* #define JANET_ARCH_NAME pdp-8 */ 54 + /* #define JANET_EV_NO_EPOLL */ 55 + /* #define JANET_EV_NO_KQUEUE */ 56 + /* #define JANET_NO_INTERPRETER_INTERRUPT */ 57 + 58 + /* Custom vm allocator support */ 59 + /* #include <mimalloc.h> */ 60 + /* #define janet_malloc(X) mi_malloc((X)) */ 61 + /* #define janet_realloc(X, Y) mi_realloc((X), (Y)) */ 62 + /* #define janet_calloc(X, Y) mi_calloc((X), (Y)) */ 63 + /* #define janet_free(X) mi_free((X)) */ 64 + 65 + /* Main client settings, does not affect library code */ 66 + /* #define JANET_SIMPLE_GETLINE */ 67 + 68 + #endif /* end of include guard: JANETCONF_H */
+118
demos/bunny/janetmark.janet
··· 1 + # title: Bunnymark in Janet 2 + # author: Alec Troemel; based on the original work of Rob Loach 3 + # desc: Benchmarking tool to see how many bunnies can fly around the screen, using Janet 4 + # input: gamepad 5 + # script: janet 6 + # version: 0.1.0 7 + 8 + (import tic80 :as t) 9 + 10 + (def SCREEN_WIDTH 240) 11 + (def SCREEN_HEIGHT 136) 12 + (def TOOLBAR_HEIGHT 6) 13 + 14 + (var t 0) 15 + (var RNG (math/rng (t/tstamp))) 16 + 17 + (defn random-float [lower greater] 18 + (+ (* (math/rng-uniform RNG) 19 + (- greater lower)) 20 + lower)) 21 + 22 + (defn draw-bunny [self] 23 + (t/spr (self :sprite) 24 + (math/round (self :x)) 25 + (math/round (self :y)) 26 + 1 1 0 0 4 4)) 27 + 28 + (defn update-bunny [self] 29 + (+= (self :x) (self :speed-x)) 30 + (+= (self :y) (self :speed-y)) 31 + 32 + (when (> (+ (self :x) (self :width)) SCREEN_WIDTH) 33 + (put self :x (- SCREEN_WIDTH (self :width))) 34 + (*= (self :speed-x) -1)) 35 + 36 + (when (< (self :x) 0) 37 + (put self :x 0) 38 + (*= (self :speed-x) -1)) 39 + 40 + (when (> (+ (self :y) (self :height)) SCREEN_HEIGHT) 41 + (put self :y (- SCREEN_HEIGHT (self :height))) 42 + (*= (self :speed-y) -1)) 43 + 44 + (when (< (self :y) 0) 45 + (put self :y 0) 46 + (*= (self :speed-y) -1))) 47 + 48 + (defn init-bunny [] 49 + (let [width 26 height 32] 50 + @{:x (random-float 0 (- SCREEN_WIDTH width)) 51 + :y (random-float 0 (- SCREEN_HEIGHT height)) 52 + :speed-x (/ (random-float -100 100) 60) 53 + :speed-y (/ (random-float -100 100) 60) 54 + :width 26 55 + :height 32 56 + :sprite 1 57 + :draw draw-bunny 58 + :update update-bunny})) 59 + 60 + (defn init-fps [] 61 + @{:value 0 62 + :frames 0 63 + :last-time -1000 64 + :get-value (fn fps-get-value [self] 65 + (if (<= (- (t/time) (self :last-time)) 1000) 66 + (+= (self :frames) 1) 67 + (do (put self :value (self :frames)) 68 + (put self :frames 0) 69 + (put self :last-time (t/time)))) 70 + (self :value))}) 71 + 72 + (var fps (init-fps)) 73 + (var bunnies @[(init-bunny)]) 74 + 75 + (defn TIC [] 76 + # Music 77 + (when (= t 0) (t/music 0)) 78 + (when (= t (* 6 64 2.375)) (t/music 1)) 79 + (+= t 1) 80 + 81 + # Input 82 + (cond (t/btn 0) (for i 0 5 (array/push bunnies (init-bunny))) 83 + (t/btn 1) (for i 0 5 (array/pop bunnies))) 84 + 85 + # Update 86 + (each bunny bunnies (:update bunny)) 87 + 88 + # Draw 89 + (t/cls 15) 90 + (each bunny bunnies (:draw bunny)) 91 + (t/rect 0 0 SCREEN_WIDTH TOOLBAR_HEIGHT 0) 92 + (t/print (string/format "Bunnies: %n" (length bunnies)) 93 + 1 0 11 false 1 false) 94 + (t/print (string/format "FPS: %n" (:get-value fps)) 95 + (/ SCREEN_WIDTH 2) 0 11 false 1 false)) 96 + 97 + # <TILES> 98 + # 001:11111100111110dd111110dc111110dc111110dc111110dc111110dd111110dd 99 + # 002:00011110ddd0110dccd0110dccd0110dccd0110dccd0110dcddd00dddddddddd 100 + # 003:00001111dddd0111cccd0111cccd0111cccd0111cccd0111dcdd0111dddd0111 101 + # 004:1111111111111111111111111111111111111111111111111111111111111111 102 + # 017:111110dd111110dd111110dd111110dd10000ddd1eeeeddd1eeeeedd10000eed 103 + # 018:d0ddddddd0ddddddddddddddddd0000dddddccddddddccdddddddddddddddddd 104 + # 019:0ddd01110ddd0111dddd0111dddd0111ddddd000ddddddddddddddddddddd000 105 + # 020:1111111111111111111111111111111101111111d0111111d011111101111111 106 + # 033:111110ee111110ee111110ee111110ee111110ee111110ee111110ee111110ee 107 + # 034:dddcccccddccccccddccccccddccccccddccccccdddcccccdddddddddddddddd 108 + # 035:dddd0111cddd0111cddd0111cddd0111cddd0111dddd0111dddd0111dddd0111 109 + # 036:1111111111111111111111111111111111111111111111111111111111111111 110 + # 049:111110ee111110ee111110ee111110ee111110ee111110ee111110ee11111100 111 + # 050:dddeeeeeddeeeeeed00000000111111101111111011111110111111111111111 112 + # 051:eddd0111eedd01110eed011110ee011110ee011110ee011110ee011111001111 113 + # 052:1111111111111111111111111111111111111111111111111111111111111111 114 + # </TILES> 115 + 116 + # <PALETTE> 117 + # 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57 118 + # </PALETTE>
+17 -13
demos/bunny/luamark.lua
··· 1 1 -- title: Bunnymark in Lua 2 2 -- author: Rabia Alhaffar 3 3 -- desc: Benchmarking tool to see how many bunnies can fly around the screen, using Lua. 4 - -- license: MIT License 4 + -- license: MIT License 5 5 -- input: gamepad 6 6 -- script: lua 7 7 -- version: 1.1.0 ··· 15 15 return (math.random() * (greater - lower)) + lower; 16 16 end 17 17 18 - Bunny = {width=0,height=0,x=0,y=0,speedX=0,speedY=0,sprite=0} 18 + Bunny = {} 19 + 20 + function Bunny:new() 21 + local width = 26 22 + local height = 32 19 23 20 - function Bunny:new(o) 21 - o = o or {} 22 - setmetatable(o, self) 24 + newBunny = { 25 + width=width, 26 + height=height, 27 + x=math.random(0, screenWidth - width), 28 + y=math.random(0, screenHeight - height), 29 + speedX = randomFloat(-100, 100) / 60, 30 + speedY = randomFloat(-100, 100) / 60, 31 + sprite = 1 32 + } 33 + 23 34 self.__index = self 24 - self.width = 26 25 - self.height = 32 26 - self.x = math.random(0, screenWidth - self.width) 27 - self.y = math.random(0, screenHeight - self.height) 28 - self.speedX = randomFloat(-100, 100) / 60 29 - self.speedY = randomFloat(-100, 100) / 60 30 - self.sprite = 1 31 - return o 35 + return setmetatable(newBunny, self) 32 36 end 33 37 34 38 function Bunny:draw()
+10
demos/fenneldemo.fnl
··· 33 33 ;; 020:ccca00ccaaaa0ccecaaa0ceeaaaa0ceeaaaa0cee8888ccee000cceeecccceeee 34 34 ;; </TILES> 35 35 36 + ;; <WAVES> 37 + ;; 000:00000000ffffffff00000000ffffffff 38 + ;; 001:0123456789abcdeffedcba9876543210 39 + ;; 002:0123456789abcdef0123456789abcdef 40 + ;; </WAVES> 41 + 42 + ;; <SFX> 43 + ;; 000:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000304000000000 44 + ;; </SFX> 45 + 36 46 ;; <PALETTE> 37 47 ;; 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57 38 48 ;; </PALETTE>
+56
demos/janetdemo.janet
··· 1 + # title: game title 2 + # author: game developer, email, etc. 3 + # desc: short description 4 + # site: website link 5 + # license: MIT License (change this to your license of choice) 6 + # version: 0.1 7 + # script: janet 8 + # strict: true 9 + 10 + # Unlike other langauges, the tic80 API 11 + # is provided as a module. 12 + (import tic80) 13 + 14 + (var t 0) 15 + (var x 96) 16 + (var y 24) 17 + 18 + (defn TIC [] 19 + (when (tic80/btn 0) (-- y)) 20 + (when (tic80/btn 1) (++ y)) 21 + (when (tic80/btn 2) (-- x)) 22 + (when (tic80/btn 3) (++ x)) 23 + (tic80/cls 13) 24 + (tic80/spr (if (> (% t 60) 30) 1 3) 25 + x y 14 3 0 0 2 2) 26 + (tic80/print "HELLO WORLD!" 84 84) 27 + (++ t)) 28 + 29 + # <TILES> 30 + # 001:eccccccccc888888caaaaaaaca888888cacccccccacc0ccccacc0ccccacc0ccc 31 + # 002:ccccceee8888cceeaaaa0cee888a0ceeccca0ccc0cca0c0c0cca0c0c0cca0c0c 32 + # 003:eccccccccc888888caaaaaaaca888888cacccccccacccccccacc0ccccacc0ccc 33 + # 004:ccccceee8888cceeaaaa0cee888a0ceeccca0cccccca0c0c0cca0c0c0cca0c0c 34 + # 017:cacccccccaaaaaaacaaacaaacaaaaccccaaaaaaac8888888cc000cccecccccec 35 + # 018:ccca00ccaaaa0ccecaaa0ceeaaaa0ceeaaaa0cee8888ccee000cceeecccceeee 36 + # 019:cacccccccaaaaaaacaaacaaacaaaaccccaaaaaaac8888888cc000cccecccccec 37 + # 020:ccca00ccaaaa0ccecaaa0ceeaaaa0ceeaaaa0cee8888ccee000cceeecccceeee 38 + # </TILES> 39 + 40 + # <WAVES> 41 + # 000:00000000ffffffff00000000ffffffff 42 + # 001:0123456789abcdeffedcba9876543210 43 + # 002:0123456789abcdef0123456789abcdef 44 + # </WAVES> 45 + 46 + # <SFX> 47 + # 000:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000304000000000 48 + # </SFX> 49 + 50 + # <PALETTE> 51 + # 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57 52 + # </PALETTE> 53 + 54 + # <TRACKS> 55 + # 000:100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 56 + # </TRACKS>
+1 -1
include/tic80_config.h
··· 29 29 !defined(TIC_BUILD_WITH_WREN) && \ 30 30 !defined(TIC_BUILD_WITH_SCHEME) && \ 31 31 !defined(TIC_BUILD_WITH_SQUIRREL) && \ 32 - !defined(TIC_BUILD_WITH_WASM) 32 + !defined(TIC_BUILD_WITH_WASM) 33 33 34 34 # define TIC_BUILD_WITH_LUA 1 35 35 # define TIC_BUILD_WITH_MOON 1
+1259
src/api/janet.c
··· 1 + /* 2 + * vim: ts=4 sts=4 sw=4 et 3 + */ 4 + 5 + // MIT License 6 + 7 + // Copyright (c) 2022 Charlotte Koch @dressupgeekout <dressupgeekout@gmail.com> 8 + 9 + // Permission is hereby granted, free of charge, to any person obtaining a copy 10 + // of this software and associated documentation files (the "Software"), to deal 11 + // in the Software without restriction, including without limitation the rights 12 + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 + // copies of the Software, and to permit persons to whom the Software is 14 + // furnished to do so, subject to the following conditions: 15 + 16 + // The above copyright notice and this permission notice shall be included in all 17 + // copies or substantial portions of the Software. 18 + 19 + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 + // SOFTWARE. 26 + 27 + #include "core/core.h" 28 + 29 + #if defined(TIC_BUILD_WITH_JANET) 30 + 31 + #include <janet.h> 32 + 33 + static inline tic_core* getJanetMachine(void); 34 + 35 + static Janet janet_print(int32_t argc, Janet* argv); 36 + static Janet janet_cls(int32_t argc, Janet* argv); 37 + static Janet janet_pix(int32_t argc, Janet* argv); 38 + static Janet janet_line(int32_t argc, Janet* argv); 39 + static Janet janet_rect(int32_t argc, Janet* argv); 40 + static Janet janet_rectb(int32_t argc, Janet* argv); 41 + static Janet janet_spr(int32_t argc, Janet* argv); 42 + static Janet janet_btn(int32_t argc, Janet* argv); 43 + static Janet janet_btnp(int32_t argc, Janet* argv); 44 + static Janet janet_sfx(int32_t argc, Janet* argv); 45 + static Janet janet_map(int32_t argc, Janet* argv); 46 + static Janet janet_mget(int32_t argc, Janet* argv); 47 + static Janet janet_mset(int32_t argc, Janet* argv); 48 + static Janet janet_peek(int32_t argc, Janet* argv); 49 + static Janet janet_poke(int32_t argc, Janet* argv); 50 + static Janet janet_peek1(int32_t argc, Janet* argv); 51 + static Janet janet_poke1(int32_t argc, Janet* argv); 52 + static Janet janet_peek2(int32_t argc, Janet* argv); 53 + static Janet janet_poke2(int32_t argc, Janet* argv); 54 + static Janet janet_peek4(int32_t argc, Janet* argv); 55 + static Janet janet_poke4(int32_t argc, Janet* argv); 56 + static Janet janet_memcpy(int32_t argc, Janet* argv); 57 + static Janet janet_memset(int32_t argc, Janet* argv); 58 + static Janet janet_trace(int32_t argc, Janet* argv); 59 + static Janet janet_pmem(int32_t argc, Janet* argv); 60 + static Janet janet_time(int32_t argc, Janet* argv); 61 + static Janet janet_tstamp(int32_t argc, Janet* argv); 62 + static Janet janet_exit(int32_t argc, Janet* argv); 63 + static Janet janet_font(int32_t argc, Janet* argv); 64 + static Janet janet_mouse(int32_t argc, Janet* argv); 65 + static Janet janet_circ(int32_t argc, Janet* argv); 66 + static Janet janet_circb(int32_t argc, Janet* argv); 67 + static Janet janet_elli(int32_t argc, Janet* argv); 68 + static Janet janet_ellib(int32_t argc, Janet* argv); 69 + static Janet janet_tri(int32_t argc, Janet* argv); 70 + static Janet janet_trib(int32_t argc, Janet* argv); 71 + static Janet janet_ttri(int32_t argc, Janet* argv); 72 + static Janet janet_clip(int32_t argc, Janet* argv); 73 + static Janet janet_music(int32_t argc, Janet* argv); 74 + static Janet janet_sync(int32_t argc, Janet* argv); 75 + static Janet janet_vbank(int32_t argc, Janet* argv); 76 + static Janet janet_reset(int32_t argc, Janet* argv); 77 + static Janet janet_key(int32_t argc, Janet* argv); 78 + static Janet janet_keyp(int32_t argc, Janet* argv); 79 + static Janet janet_fget(int32_t argc, Janet* argv); 80 + static Janet janet_fset(int32_t argc, Janet* argv); 81 + 82 + static void closeJanet(tic_mem* tic); 83 + static bool initJanet(tic_mem* tic, const char* code); 84 + static void evalJanet(tic_mem* tic, const char* code); 85 + static void callJanetTick(tic_mem* tic); 86 + static void callJanetBoot(tic_mem* tic); 87 + static void callJanetIntCallback(tic_mem* memory, s32 value, void* data, const char* name); 88 + static void callJanetScanline(tic_mem* memory, s32 row, void* data); 89 + static void callJanetBorder(tic_mem* memory, s32 row, void* data); 90 + static void callJanetMenu(tic_mem* memory, s32 index, void* data); 91 + static const tic_outline_item* getJanetOutline(const char* code, s32* size); 92 + 93 + /* ***************** */ 94 + 95 + static const JanetReg janet_c_functions[] = 96 + { 97 + {"print", janet_print, NULL}, 98 + {"cls", janet_cls, NULL}, 99 + {"pix", janet_pix, NULL}, 100 + {"line", janet_line, NULL}, 101 + {"rect", janet_rect, NULL}, 102 + {"rectb", janet_rectb, NULL}, 103 + {"spr", janet_spr, NULL}, 104 + {"btn", janet_btn, NULL}, 105 + {"btnp", janet_btnp, NULL}, 106 + {"sfx", janet_sfx, NULL}, 107 + {"map", janet_map, NULL}, 108 + {"mget", janet_mget, NULL}, 109 + {"mset", janet_mset, NULL}, 110 + {"peek", janet_peek, NULL}, 111 + {"poke", janet_poke, NULL}, 112 + {"peek1", janet_peek1, NULL}, 113 + {"poke1", janet_poke1, NULL}, 114 + {"peek2", janet_peek2, NULL}, 115 + {"poke2", janet_poke2, NULL}, 116 + {"peek4", janet_peek4, NULL}, 117 + {"poke4", janet_poke4, NULL}, 118 + {"memcpy", janet_memcpy, NULL}, 119 + {"memset", janet_memset, NULL}, 120 + {"trace", janet_trace, NULL}, 121 + {"pmem", janet_pmem, NULL}, 122 + {"time", janet_time, NULL}, 123 + {"tstamp", janet_tstamp, NULL}, 124 + {"exit", janet_exit, NULL}, 125 + {"font", janet_font, NULL}, 126 + {"mouse", janet_mouse, NULL}, 127 + {"circ", janet_circ, NULL}, 128 + {"circb", janet_circb, NULL}, 129 + {"elli", janet_elli, NULL}, 130 + {"ellib", janet_ellib, NULL}, 131 + {"tri", janet_tri, NULL}, 132 + {"trib", janet_trib, NULL}, 133 + {"ttri", janet_ttri, NULL}, 134 + {"clip", janet_clip, NULL}, 135 + {"music", janet_music, NULL}, 136 + {"sync", janet_sync, NULL}, 137 + {"vbank", janet_vbank, NULL}, 138 + {"reset", janet_reset, NULL}, 139 + {"key", janet_key, NULL}, 140 + {"keyp", janet_keyp, NULL}, 141 + {"fget", janet_fget, NULL}, 142 + {"fset", janet_fset, NULL}, 143 + {NULL, NULL, NULL} 144 + }; 145 + 146 + static const char* const JanetKeywords[] = 147 + { 148 + "defmacro", "withsyms", "macex1", "macex", 149 + "do", "values", "break" 150 + "if", "when", "cond", "match", 151 + "each", "for", "loop", "while", 152 + "fn", "defn", "partial", 153 + "def", "var", "set", "defglobal", "let", "set", "put", 154 + "if-let", "when-let", "if-not", 155 + "or", "and", "true", "false", "nil", "not", "not=", "length", 156 + "brshift", "blshift", "bor", "band", "bnot", "bxor", 157 + "#", ":", "->", "->>", "-?>", "-?>>", "$", 158 + "quasiquote", "quote", "unquote", "upscope", 159 + "splice", ";" 160 + }; 161 + 162 + static JanetFiber* GameFiber = NULL; 163 + static JanetBuffer *errBuffer; 164 + static tic_core* CurrentMachine = NULL; 165 + 166 + 167 + static inline tic_core* getJanetMachine(void) 168 + { 169 + return CurrentMachine; 170 + } 171 + 172 + /* ***************** */ 173 + 174 + typedef struct 175 + { 176 + s32 note; 177 + s32 octave; 178 + } SFXNote; 179 + 180 + static SFXNote tic_optsfxnote(Janet *argv, int32_t argc, int32_t n) 181 + { 182 + SFXNote sfxNote = {-1, -1}; 183 + 184 + if (argc < n) 185 + { 186 + return sfxNote; 187 + } 188 + else if (janet_checktype(argv[n], JANET_STRING)) 189 + { 190 + const char *noteStr = janet_getcstring(argv, n); 191 + 192 + if (!tic_tool_parse_note(noteStr, &sfxNote.note, &sfxNote.octave)) 193 + { 194 + janet_panicf("invalid note, should be like C#4, got %s\n", noteStr); 195 + } 196 + 197 + return sfxNote; 198 + } 199 + else 200 + { 201 + s32 id = janet_getinteger(argv, n); 202 + sfxNote.note = id % NOTES; 203 + sfxNote.octave = id / NOTES; 204 + return sfxNote; 205 + } 206 + } 207 + 208 + typedef struct 209 + { 210 + u8 colors[TIC_PALETTE_SIZE]; 211 + int32_t count; 212 + } ColorKey; 213 + 214 + static ColorKey tic_optcolorkey(Janet *argv, int32_t argc, int32_t n) 215 + { 216 + ColorKey colorkey = {0}; 217 + colorkey.count = 0; 218 + 219 + if (argc > n) 220 + { 221 + if (janet_checktypes(argv[n], JANET_TFLAG_INDEXED)) 222 + { 223 + JanetView keys = janet_getindexed(argv, n); 224 + s32 list_count = keys.len; 225 + 226 + for(s32 i = 0; i < TIC_PALETTE_SIZE; i++) 227 + { 228 + if (i < list_count) 229 + { 230 + colorkey.colors[i] = (s32)janet_getinteger(keys.items, i);; 231 + colorkey.count++; 232 + } 233 + else 234 + { 235 + break; 236 + } 237 + } 238 + } 239 + else if (janet_checkint(argv[n])) 240 + { 241 + colorkey.colors[0] = (s32)janet_getnumber(argv, n); 242 + colorkey.count = 1; 243 + } 244 + else 245 + { 246 + janet_panic("Error: colorkeys must be either int or list of int"); 247 + } 248 + } 249 + 250 + return colorkey; 251 + } 252 + 253 + typedef struct 254 + { 255 + float z[3]; 256 + bool on; 257 + } TriDepth; 258 + 259 + static TriDepth tic_opttridepth(Janet* argv, int32_t argc, int32_t n) 260 + { 261 + TriDepth depth = {0}; 262 + depth.on = false; 263 + 264 + if (argc > n) 265 + { 266 + depth.on = true; 267 + 268 + depth.z[0] = janet_getnumber(argv, n); 269 + depth.z[1] = janet_getnumber(argv, n+1); 270 + depth.z[2] = janet_getnumber(argv, n+2); 271 + } 272 + 273 + return depth; 274 + } 275 + 276 + /* ***************** */ 277 + 278 + static Janet janet_print(int32_t argc, Janet* argv) 279 + { 280 + janet_arity(argc, 1, 7); 281 + 282 + s32 x = 0; 283 + s32 y = 0; 284 + u8 color = 15; 285 + bool fixed = false; 286 + s32 scale = 1; 287 + bool alt = false; 288 + 289 + const char *text = janet_getcstring(argv, 0); 290 + if (argc >= 2) x = (s32)janet_getinteger(argv, 1); 291 + if (argc >= 3) y = (s32)janet_getinteger(argv, 2); 292 + if (argc >= 4) color = (u8)janet_getinteger(argv, 3); 293 + if (argc >= 5) fixed = janet_getboolean(argv, 4); 294 + if (argc >= 6) scale = (s32)janet_getinteger(argv, 5); 295 + if (argc >= 7) alt = janet_getboolean(argv, 6); 296 + 297 + tic_mem* memory = (tic_mem*)getJanetMachine(); 298 + int32_t width = tic_api_print(memory, text, x, y, color, fixed, scale, alt); 299 + return janet_wrap_integer(width); 300 + } 301 + 302 + static Janet janet_cls(int32_t argc, Janet* argv) 303 + { 304 + janet_arity(argc, 0, 1); 305 + u32 color = (u32)janet_optinteger(argv, argc, 0, 0); 306 + tic_mem* memory = (tic_mem*)getJanetMachine(); 307 + tic_api_cls(memory, color); 308 + return janet_wrap_nil(); 309 + } 310 + 311 + static Janet janet_pix(int32_t argc, Janet* argv) 312 + { 313 + janet_arity(argc, 2, 3); 314 + 315 + bool get; 316 + u8 color = 0; 317 + 318 + s32 x = (s32)janet_getinteger(argv, 0); 319 + s32 y = (s32)janet_getinteger(argv, 1); 320 + 321 + if (argc == 2) { 322 + get = true; 323 + } else { 324 + color = (u8)janet_getinteger(argv, 2); 325 + get = false; 326 + } 327 + 328 + tic_mem* memory = (tic_mem*)getJanetMachine(); 329 + return janet_wrap_integer(tic_api_pix(memory, x, y, color, get)); 330 + } 331 + 332 + static Janet janet_line(int32_t argc, Janet* argv) 333 + { 334 + janet_fixarity(argc, 5); 335 + 336 + float x1 = (float)janet_getnumber(argv, 0); 337 + float y1 = (float)janet_getnumber(argv, 1); 338 + float x2 = (float)janet_getnumber(argv, 2); 339 + float y2 = (float)janet_getnumber(argv, 3); 340 + u8 color = (u8)janet_getinteger(argv, 4); 341 + 342 + tic_mem* memory = (tic_mem*)getJanetMachine(); 343 + tic_api_line(memory, x1, y1, x2, y2, color); 344 + return janet_wrap_nil(); 345 + } 346 + 347 + static Janet janet_rect(int32_t argc, Janet* argv) 348 + { 349 + janet_fixarity(argc, 5); 350 + 351 + s32 x = (s32)janet_getinteger(argv, 0); 352 + s32 y = (s32)janet_getinteger(argv, 1); 353 + s32 width = (s32)janet_getinteger(argv, 2); 354 + s32 height = (s32)janet_getinteger(argv, 3); 355 + u8 color = (u8)janet_getinteger(argv, 4); 356 + 357 + tic_mem* memory = (tic_mem*)getJanetMachine(); 358 + tic_api_rect(memory, x, y, width, height, color); 359 + return janet_wrap_nil(); 360 + } 361 + 362 + static Janet janet_rectb(int32_t argc, Janet* argv) 363 + { 364 + janet_fixarity(argc, 5); 365 + 366 + s32 x = (s32)janet_getinteger(argv, 0); 367 + s32 y = (s32)janet_getinteger(argv, 1); 368 + s32 width = (s32)janet_getinteger(argv, 2); 369 + s32 height = (s32)janet_getinteger(argv, 3); 370 + u8 color = (u8)janet_getinteger(argv, 4); 371 + 372 + tic_mem* memory = (tic_mem*)getJanetMachine(); 373 + tic_api_rectb(memory, x, y, width, height, color); 374 + return janet_wrap_nil(); 375 + } 376 + 377 + static Janet janet_spr(int32_t argc, Janet* argv) 378 + { 379 + janet_arity(argc, 3, 9); 380 + 381 + s32 index = (s32)janet_getinteger(argv, 0); 382 + s32 x = (s32)janet_getinteger(argv, 1); 383 + s32 y = (s32)janet_getinteger(argv, 2); 384 + 385 + ColorKey colorkey = tic_optcolorkey(argv, argc, 3); 386 + 387 + s32 scale = (s32)janet_optnumber(argv, argc, 4, 1); 388 + tic_flip flip = (s32)janet_optnumber(argv, argc, 5, tic_no_flip); 389 + tic_rotate rotate = (s32)janet_optnumber(argv, argc, 6, tic_no_rotate); 390 + s32 w = (s32)janet_optnumber(argv, argc, 7, 1); 391 + s32 h = (s32)janet_optnumber(argv, argc, 8, 1); 392 + 393 + tic_mem* memory = (tic_mem*)getJanetMachine(); 394 + tic_api_spr(memory, index, x, y, w, h, 395 + colorkey.colors, colorkey.count, 396 + scale, flip, rotate); 397 + 398 + return janet_wrap_nil(); 399 + } 400 + 401 + static Janet janet_btn(int32_t argc, Janet* argv) 402 + { 403 + janet_fixarity(argc, 1); 404 + 405 + s32 id = (s32)janet_getinteger(argv, 0); 406 + 407 + tic_mem* memory = (tic_mem*)getJanetMachine(); 408 + return janet_wrap_boolean(tic_api_btn(memory, id)); 409 + } 410 + 411 + static Janet janet_btnp(int32_t argc, Janet* argv) 412 + { 413 + janet_arity(argc, 1, 3); 414 + 415 + s32 id = (s32)janet_getinteger(argv, 0); 416 + s32 hold = (s32)janet_optinteger(argv, argc, 1, -1); 417 + s32 period = (s32)janet_optinteger(argv, argc, 2, -1); 418 + 419 + tic_mem* memory = (tic_mem*)getJanetMachine(); 420 + 421 + return janet_wrap_boolean(tic_api_btnp(memory, id, hold, period)); 422 + } 423 + 424 + static Janet janet_sfx(int32_t argc, Janet* argv) 425 + { 426 + janet_arity(argc, 1, 6); 427 + 428 + s32 index = (s32)janet_getinteger(argv, 0); 429 + SFXNote sfxNote = tic_optsfxnote(argv, argc, 1); 430 + s32 duration = (s32)janet_optinteger(argv, argc, 2, -1); 431 + s32 channel = (s32)janet_optinteger(argv, argc, 3, 0); 432 + 433 + s32 volumes[TIC80_SAMPLE_CHANNELS] = {0}; 434 + volumes[0] = (s32)janet_optinteger(argv, argc, 4, MAX_VOLUME); 435 + volumes[1] = volumes[0]; 436 + 437 + s32 speed = (s32)janet_optinteger(argv, argc, 5, SFX_DEF_SPEED); 438 + 439 + tic_mem* memory = (tic_mem*)getJanetMachine(); 440 + tic_api_sfx(memory, index, 441 + sfxNote.note, sfxNote.octave, 442 + duration, channel, 443 + volumes[0] & 0xf, volumes[1] & 0xf, 444 + speed); 445 + return janet_wrap_nil(); 446 + } 447 + 448 + static void remapCallback(void* data, s32 x, s32 y, RemapResult* result) 449 + { 450 + JanetFunction* remap_fn = (JanetFunction*)data; 451 + 452 + Janet *argv = janet_tuple_begin(3); 453 + argv[0] = janet_wrap_integer(result->index); 454 + argv[1] = janet_wrap_integer(x); 455 + argv[2] = janet_wrap_integer(y); 456 + janet_tuple_end(argv); 457 + 458 + Janet jresult = janet_call(remap_fn, 3, argv); 459 + 460 + if (janet_checktypes(jresult, JANET_TFLAG_INDEXED)) 461 + { 462 + const Janet *jresult_tuple = janet_unwrap_tuple(jresult); 463 + u8 retc = janet_tuple_length(jresult_tuple); 464 + result->index = janet_getinteger(jresult_tuple, 0); 465 + result->flip = janet_optinteger(jresult_tuple, retc, 1, 0); 466 + result->rotate = janet_optinteger(jresult_tuple, retc, 2, 0); 467 + } 468 + else if (janet_checkint(jresult)) 469 + { 470 + result->index = janet_unwrap_integer(jresult); 471 + } 472 + } 473 + 474 + static Janet janet_map(int32_t argc, Janet* argv) 475 + { 476 + janet_arity(argc, 0, 9); 477 + 478 + s32 x = (s32)janet_optinteger(argv, argc, 0, 0); 479 + s32 y = (s32)janet_optinteger(argv, argc, 1, 0); 480 + 481 + s32 w = (s32)janet_optinteger(argv, argc, 2, 30); 482 + s32 h = (s32)janet_optinteger(argv, argc, 3, 17); 483 + 484 + s32 sx = (s32)janet_optinteger(argv, argc, 4, 0); 485 + s32 sy = (s32)janet_optinteger(argv, argc, 5, 0); 486 + 487 + ColorKey colorkey = tic_optcolorkey(argv, argc, 6); 488 + 489 + s32 scale = (s32)janet_optnumber(argv, argc, 7, 1); 490 + 491 + tic_mem* memory = (tic_mem*)getJanetMachine(); 492 + 493 + if (argc < 9) 494 + { 495 + tic_api_map(memory, x, y, w, h, sx, sy, 496 + colorkey.colors, colorkey.count, 497 + scale, NULL, NULL); 498 + } 499 + else 500 + { 501 + JanetFunction *remap = janet_getfunction(argv, 8); 502 + tic_api_map(memory, x, y, w, h, sx, sy, 503 + colorkey.colors, colorkey.count, 504 + scale, 505 + remapCallback, remap); 506 + } 507 + 508 + return janet_wrap_nil(); 509 + } 510 + 511 + static Janet janet_mget(int32_t argc, Janet* argv) 512 + { 513 + janet_fixarity(argc, 2); 514 + 515 + s32 x = (s32)janet_getinteger(argv, 0); 516 + s32 y = (s32)janet_getinteger(argv, 1); 517 + 518 + tic_mem* memory = (tic_mem*)getJanetMachine(); 519 + return janet_wrap_integer(tic_api_mget(memory, x, y)); 520 + } 521 + 522 + static Janet janet_mset(int32_t argc, Janet* argv) 523 + { 524 + janet_fixarity(argc, 3); 525 + 526 + s32 x = (s32)janet_getinteger(argv, 0); 527 + s32 y = (s32)janet_getinteger(argv, 1); 528 + u8 value = (u8)janet_getinteger(argv, 2); 529 + 530 + tic_mem* memory = (tic_mem*)getJanetMachine(); 531 + tic_api_mset(memory, x, y, value); 532 + return janet_wrap_nil(); 533 + } 534 + 535 + static Janet janet_peek(int32_t argc, Janet* argv) 536 + { 537 + janet_arity(argc, 1, 2); 538 + s32 address = (s32)janet_getinteger(argv, 0); 539 + s32 bits = (s32)janet_optinteger(argv, argc, 1, BITS_IN_BYTE); 540 + 541 + tic_mem* memory = (tic_mem*)getJanetMachine(); 542 + return janet_wrap_integer(tic_api_peek(memory, address, bits)); 543 + } 544 + 545 + static Janet janet_poke(int32_t argc, Janet* argv) 546 + { 547 + janet_arity(argc, 2, 3); 548 + s32 address = (s32)janet_getinteger(argv, 0); 549 + u8 value = (s32)janet_getinteger(argv, 1); 550 + s32 bits = (s32)janet_optinteger(argv, argc, 2, BITS_IN_BYTE); 551 + 552 + tic_mem* memory = (tic_mem*)getJanetMachine(); 553 + tic_api_poke(memory, address, value, bits); 554 + 555 + return janet_wrap_nil(); 556 + } 557 + 558 + static Janet janet_peek1(int32_t argc, Janet* argv) 559 + { 560 + janet_fixarity(argc, 1); 561 + 562 + u8 address = (u8)janet_getinteger(argv, 0); 563 + 564 + tic_mem* memory = (tic_mem*)getJanetMachine(); 565 + return janet_wrap_integer(tic_api_peek1(memory, address)); 566 + } 567 + 568 + static Janet janet_poke1(int32_t argc, Janet* argv) 569 + { 570 + janet_fixarity(argc, 2); 571 + 572 + s32 address = (s32)janet_getinteger(argv, 0); 573 + u8 value = (u8)janet_getinteger(argv, 1); 574 + 575 + tic_mem* memory = (tic_mem*)getJanetMachine(); 576 + tic_api_poke1(memory, address, value); 577 + return janet_wrap_nil(); 578 + } 579 + 580 + static Janet janet_peek2(int32_t argc, Janet* argv) 581 + { 582 + janet_fixarity(argc, 1); 583 + 584 + s32 address = janet_getinteger(argv, 0); 585 + 586 + tic_mem* memory = (tic_mem*)getJanetMachine(); 587 + return janet_wrap_integer(tic_api_peek2(memory, address)); 588 + } 589 + 590 + static Janet janet_poke2(int32_t argc, Janet* argv) 591 + { 592 + janet_fixarity(argc, 2); 593 + 594 + s32 address = janet_getinteger(argv, 0); 595 + u8 value = janet_getinteger(argv, 1); 596 + 597 + tic_mem* memory = (tic_mem*)getJanetMachine(); 598 + tic_api_poke2(memory, address, value); 599 + return janet_wrap_nil(); 600 + } 601 + 602 + static Janet janet_peek4(int32_t argc, Janet* argv) 603 + { 604 + janet_fixarity(argc, 1); 605 + 606 + s32 address = janet_getinteger(argv, 0); 607 + 608 + tic_mem* memory = (tic_mem*)getJanetMachine(); 609 + return janet_wrap_integer(tic_api_peek4(memory, address)); 610 + } 611 + 612 + static Janet janet_poke4(int32_t argc, Janet* argv) 613 + { 614 + janet_fixarity(argc, 2); 615 + 616 + s32 address = janet_getinteger(argv, 0); 617 + u8 value = janet_getinteger(argv, 1); 618 + 619 + tic_mem* memory = (tic_mem*)getJanetMachine(); 620 + tic_api_poke4(memory, address, value); 621 + return janet_wrap_nil(); 622 + } 623 + 624 + static Janet janet_memcpy(int32_t argc, Janet* argv) 625 + { 626 + janet_fixarity(argc, 3); 627 + 628 + s32 dst = janet_getinteger(argv, 0); 629 + s32 src = janet_getinteger(argv, 1); 630 + s32 size = janet_getinteger(argv, 2); 631 + 632 + tic_mem* memory = (tic_mem*)getJanetMachine(); 633 + tic_api_memcpy(memory, dst, src, size); 634 + return janet_wrap_nil(); 635 + } 636 + 637 + static Janet janet_memset(int32_t argc, Janet* argv) 638 + { 639 + janet_fixarity(argc, 3); 640 + 641 + s32 dst = janet_getinteger(argv, 0); 642 + u8 val = janet_getinteger(argv, 1); 643 + s32 size = janet_getinteger(argv, 2); 644 + 645 + tic_mem* memory = (tic_mem*)getJanetMachine(); 646 + tic_api_memset(memory, dst, val, size); 647 + return janet_wrap_nil(); 648 + } 649 + 650 + static Janet janet_trace(int32_t argc, Janet* argv) 651 + { 652 + janet_arity(argc, 1, 2); 653 + u8 color = 15; 654 + 655 + const char *message = janet_getcstring(argv, 0); 656 + 657 + if (argc > 1) { 658 + color = janet_getinteger(argv, 1); 659 + } 660 + 661 + tic_mem* memory = (tic_mem*)getJanetMachine(); 662 + tic_api_trace(memory, message, color); 663 + return janet_wrap_nil(); 664 + } 665 + 666 + static Janet janet_pmem(int32_t argc, Janet* argv) 667 + { 668 + janet_arity(argc, 1, 2); 669 + s32 index; 670 + u32 value; 671 + bool get = true; 672 + 673 + index = janet_getinteger(argv, 0); 674 + 675 + if (argc >= 2) { 676 + value = janet_getinteger(argv, 1); 677 + get = false; 678 + } 679 + 680 + tic_mem* memory = (tic_mem*)getJanetMachine(); 681 + return janet_wrap_integer(tic_api_pmem(memory, index, value, 682 + get)); 683 + } 684 + 685 + static Janet janet_time(int32_t argc, Janet* argv) 686 + { 687 + janet_fixarity(argc, 0); 688 + tic_mem* memory = (tic_mem*)getJanetMachine(); 689 + return janet_wrap_number(tic_api_time(memory)); 690 + } 691 + 692 + static Janet janet_tstamp(int32_t argc, Janet* argv) 693 + { 694 + janet_fixarity(argc, 0); 695 + tic_mem* memory = (tic_mem*)getJanetMachine(); 696 + return janet_wrap_integer(tic_api_tstamp(memory)); 697 + } 698 + 699 + static Janet janet_exit(int32_t argc, Janet* argv) 700 + { 701 + janet_fixarity(argc, 0); 702 + tic_mem* memory = (tic_mem*)getJanetMachine(); 703 + tic_api_exit(memory); 704 + return janet_wrap_nil(); 705 + } 706 + 707 + static Janet janet_font(int32_t argc, Janet* argv) 708 + { 709 + janet_arity(argc, 3, 9); 710 + 711 + const char* text = janet_getcstring(argv, 0); 712 + s32 x = (s32)janet_getinteger(argv, 1); 713 + s32 y = (s32)janet_getinteger(argv, 2); 714 + 715 + u8 chromakey = (u8)janet_optinteger(argv, argc, 3, 0); 716 + s32 w= (s32)janet_optinteger(argv, argc, 4, 0); 717 + s32 h = (s32)janet_optinteger(argv, argc, 5, 0); 718 + bool fixed = janet_optboolean(argv, argc, 6, false); 719 + s32 scale = (s32)janet_optinteger(argv, argc, 7, 1); 720 + bool alt = janet_optboolean(argv, argc, 8, false); 721 + 722 + tic_mem* memory = (tic_mem*)getJanetMachine(); 723 + int32_t width = tic_api_font(memory, 724 + text, x, y, &chromakey, 1, 725 + w, h, fixed, scale, alt); 726 + return janet_wrap_integer(width); 727 + } 728 + 729 + static Janet janet_mouse(int32_t argc, Janet* argv) 730 + { 731 + janet_fixarity(argc, 0); 732 + 733 + tic_mem* memory = (tic_mem*)getJanetMachine(); 734 + Janet result[7]; 735 + 736 + { 737 + tic_point point = tic_api_mouse(memory); 738 + result[0] = janet_wrap_integer(point.x); 739 + result[1] = janet_wrap_integer(point.y); 740 + } 741 + 742 + tic_core* core = getJanetMachine(); 743 + const tic80_mouse* mouse = &core->memory.ram->input.mouse; 744 + result[2] = janet_wrap_boolean(mouse->left); 745 + result[3] = janet_wrap_boolean(mouse->middle); 746 + result[4] = janet_wrap_boolean(mouse->right); 747 + result[5] = janet_wrap_number(mouse->scrollx); 748 + result[6] = janet_wrap_number(mouse->scrolly); 749 + 750 + return janet_wrap_tuple(janet_tuple_n(result, 7)); 751 + } 752 + 753 + static Janet janet_circ(int32_t argc, Janet* argv) 754 + { 755 + janet_fixarity(argc, 4); 756 + 757 + s32 x = janet_getinteger(argv, 0); 758 + s32 y = janet_getinteger(argv, 1); 759 + s32 radius = janet_getinteger(argv, 2); 760 + u8 color = janet_getinteger(argv, 3); 761 + 762 + tic_mem* memory = (tic_mem*)getJanetMachine(); 763 + tic_api_circ(memory, x, y, radius, color); 764 + return janet_wrap_nil(); 765 + } 766 + 767 + static Janet janet_circb(int32_t argc, Janet* argv) 768 + { 769 + janet_fixarity(argc, 4); 770 + 771 + s32 x = janet_getinteger(argv, 0); 772 + s32 y = janet_getinteger(argv, 1); 773 + s32 radius = janet_getinteger(argv, 2); 774 + u8 color = janet_getinteger(argv, 3); 775 + 776 + tic_mem* memory = (tic_mem*)getJanetMachine(); 777 + tic_api_circb(memory, x, y, radius, color); 778 + return janet_wrap_nil(); 779 + } 780 + 781 + static Janet janet_elli(int32_t argc, Janet* argv) 782 + { 783 + janet_fixarity(argc, 5); 784 + 785 + s32 x = janet_getinteger(argv, 0); 786 + s32 y = janet_getinteger(argv, 1); 787 + s32 a = janet_getinteger(argv, 2); 788 + s32 b = janet_getinteger(argv, 3); 789 + u8 color = janet_getinteger(argv, 4); 790 + 791 + tic_mem* memory = (tic_mem*)getJanetMachine(); 792 + tic_api_elli(memory, x, y, a, b, color); 793 + return janet_wrap_nil(); 794 + } 795 + 796 + static Janet janet_ellib(int32_t argc, Janet* argv) 797 + { 798 + janet_fixarity(argc, 5); 799 + 800 + s32 x = janet_getinteger(argv, 0); 801 + s32 y = janet_getinteger(argv, 1); 802 + s32 a = janet_getinteger(argv, 2); 803 + s32 b = janet_getinteger(argv, 3); 804 + u8 color = janet_getinteger(argv, 4); 805 + 806 + tic_mem* memory = (tic_mem*)getJanetMachine(); 807 + tic_api_ellib(memory, x, y, a, b, color); 808 + return janet_wrap_nil(); 809 + } 810 + 811 + static Janet janet_tri(int32_t argc, Janet* argv) 812 + { 813 + janet_fixarity(argc, 7); 814 + 815 + float x1 = janet_getnumber(argv, 0); 816 + float y1 = janet_getnumber(argv, 1); 817 + float x2 = janet_getnumber(argv, 2); 818 + float y2 = janet_getnumber(argv, 3); 819 + float x3 = janet_getnumber(argv, 4); 820 + float y3 = janet_getnumber(argv, 5); 821 + u8 color = janet_getnumber(argv, 6); 822 + 823 + tic_mem* memory = (tic_mem*)getJanetMachine(); 824 + tic_api_tri(memory, x1, y1, x2, y2, x3, y3, color); 825 + return janet_wrap_nil(); 826 + } 827 + 828 + static Janet janet_trib(int32_t argc, Janet* argv) 829 + { 830 + janet_fixarity(argc, 7); 831 + 832 + float x1 = janet_getnumber(argv, 0); 833 + float y1 = janet_getnumber(argv, 1); 834 + float x2 = janet_getnumber(argv, 2); 835 + float y2 = janet_getnumber(argv, 3); 836 + float x3 = janet_getnumber(argv, 4); 837 + float y3 = janet_getnumber(argv, 5); 838 + u8 color = janet_getnumber(argv, 6); 839 + 840 + tic_mem* memory = (tic_mem*)getJanetMachine(); 841 + tic_api_trib(memory, x1, y1, x2, y2, x3, y3, color); 842 + return janet_wrap_nil(); 843 + } 844 + 845 + static Janet janet_ttri(int32_t argc, Janet* argv) 846 + { 847 + janet_arity(argc, 12, 17); 848 + 849 + float x1 = janet_getnumber(argv, 0); 850 + float y1 = janet_getnumber(argv, 1); 851 + float x2 = janet_getnumber(argv, 2); 852 + float y2 = janet_getnumber(argv, 3); 853 + float x3 = janet_getnumber(argv, 4); 854 + float y3 = janet_getnumber(argv, 5); 855 + 856 + float u1 = janet_getnumber(argv, 6); 857 + float v1 = janet_getnumber(argv, 7); 858 + float u2 = janet_getnumber(argv, 8); 859 + float v2 = janet_getnumber(argv, 9); 860 + float u3 = janet_getnumber(argv, 10); 861 + float v3 = janet_getnumber(argv, 11); 862 + 863 + tic_texture_src src = tic_tiles_texture; 864 + if (janet_optboolean(argv, argc, 12, false)) { 865 + src = tic_map_texture; 866 + } 867 + 868 + ColorKey trans = tic_optcolorkey(argv, argc, 13); 869 + TriDepth depth = tic_opttridepth(argv, argc, 14); 870 + 871 + tic_mem* memory = (tic_mem*)getJanetMachine(); 872 + tic_api_ttri(memory, 873 + x1, y1, 874 + x2, y2, 875 + x3, y3, 876 + u1, v1, 877 + u2, v2, 878 + u3, v3, 879 + src, 880 + trans.colors, trans.count, 881 + depth.z[0], depth.z[1], depth.z[2], depth.on); 882 + 883 + return janet_wrap_nil(); 884 + } 885 + 886 + static Janet janet_clip(int32_t argc, Janet* argv) 887 + { 888 + janet_arity(argc, 0, 4); 889 + 890 + tic_mem* memory = (tic_mem*)getJanetMachine(); 891 + 892 + if (argc == 0) { 893 + tic_api_clip(memory, 0, 0, TIC80_WIDTH, TIC80_HEIGHT); 894 + } else if (argc == 4) { 895 + s32 x = janet_getinteger(argv, 0); 896 + s32 y = janet_getinteger(argv, 1); 897 + s32 w = janet_getinteger(argv, 2); 898 + s32 h = janet_getinteger(argv, 3); 899 + tic_api_clip(memory, x, y, w, h); 900 + } else { 901 + janet_panic("Error: must provide exactly 0 or 4 args."); 902 + } 903 + 904 + return janet_wrap_nil(); 905 + } 906 + 907 + static Janet janet_music(int32_t argc, Janet* argv) 908 + { 909 + janet_arity(argc, 0, 7); 910 + 911 + s32 track = janet_optinteger(argv, argc, 0, -1); 912 + s32 frame = janet_optinteger(argv, argc, 1, -1); 913 + s32 row = janet_optinteger(argv, argc, 2, -1); 914 + bool loop = janet_optboolean(argv, argc, 3, true); 915 + bool sustain = janet_optboolean(argv, argc, 4, true); 916 + s32 tempo = janet_optinteger(argv, argc, 5, -1); 917 + s32 speed = janet_optinteger(argv, argc, 6, -1); 918 + 919 + tic_mem* memory = (tic_mem*)getJanetMachine(); 920 + tic_api_music(memory, track, frame, row, loop, sustain, tempo, speed); 921 + 922 + return janet_wrap_nil(); 923 + } 924 + 925 + static Janet janet_sync(int32_t argc, Janet* argv) 926 + { 927 + janet_arity(argc, 0, 3); 928 + 929 + u32 mask = janet_optinteger(argv, argc, 0, 0); 930 + s32 bank = janet_optinteger(argv, argc, 1, 0); 931 + bool toCart = janet_optboolean(argv, argc, 2, false); 932 + 933 + tic_mem* memory = (tic_mem*)getJanetMachine(); 934 + tic_api_sync(memory, mask, bank, toCart); 935 + return janet_wrap_nil(); 936 + } 937 + 938 + static Janet janet_vbank(int32_t argc, Janet* argv) 939 + { 940 + janet_fixarity(argc, 1); 941 + 942 + s32 bank = janet_getinteger(argv, 0); 943 + 944 + tic_mem* memory = (tic_mem*)getJanetMachine(); 945 + return janet_wrap_integer(tic_api_vbank(memory, bank)); 946 + } 947 + 948 + static Janet janet_reset(int32_t argc, Janet* argv) 949 + { 950 + janet_fixarity(argc, 0); 951 + tic_core* machine = getJanetMachine(); 952 + machine->state.initialized = false; 953 + return janet_wrap_nil(); 954 + } 955 + 956 + static Janet janet_key(int32_t argc, Janet* argv) 957 + { 958 + janet_arity(argc, 0, 1); 959 + tic_key key = -1; 960 + 961 + if (argc >= 1) key = (tic_key)janet_getinteger(argv, 0); 962 + 963 + tic_mem* memory = (tic_mem*)getJanetMachine(); 964 + return janet_wrap_boolean(tic_api_key(memory, key)); 965 + } 966 + 967 + static Janet janet_keyp(int32_t argc, Janet* argv) 968 + { 969 + janet_arity(argc, 0, 3); 970 + tic_key key = -1; 971 + s32 hold = -1; 972 + s32 period = -1; 973 + 974 + if (argc >= 1) key = (tic_key)janet_getinteger(argv, 0); 975 + if (argc >= 2) hold = janet_getinteger(argv, 1); 976 + if (argc >= 3) period = janet_getinteger(argv, 2); 977 + 978 + tic_mem* memory = (tic_mem*)getJanetMachine(); 979 + return janet_wrap_boolean(tic_api_keyp(memory, key, hold, period)); 980 + } 981 + 982 + static Janet janet_fget(int32_t argc, Janet* argv) 983 + { 984 + janet_fixarity(argc, 2); 985 + 986 + s32 index = janet_getinteger(argv, 0); 987 + u8 flag = janet_getinteger(argv, 1); 988 + 989 + tic_mem* memory = (tic_mem*)getJanetMachine(); 990 + return janet_wrap_boolean(tic_api_fget(memory, index, flag)); 991 + } 992 + 993 + 994 + static Janet janet_fset(int32_t argc, Janet* argv) 995 + { 996 + janet_fixarity(argc, 3); 997 + 998 + s32 index = janet_getinteger(argv, 0); 999 + u8 flag = janet_getinteger(argv, 1); 1000 + bool value = janet_getboolean(argv, 2); 1001 + 1002 + tic_mem* memory = (tic_mem*)getJanetMachine(); 1003 + tic_api_fset(memory, index, flag, value); 1004 + return janet_wrap_nil(); 1005 + } 1006 + 1007 + /* ***************** */ 1008 + static void reportError(tic_core* core, Janet result) 1009 + { 1010 + janet_stacktrace(GameFiber, result); 1011 + janet_buffer_push_u8(errBuffer, 0); 1012 + core->data->error(core->data->data, errBuffer->data); 1013 + } 1014 + 1015 + 1016 + static void closeJanet(tic_mem* tic) 1017 + { 1018 + tic_core* core = (tic_core*)tic; 1019 + 1020 + if (core->currentVM) { 1021 + janet_deinit(); 1022 + core->currentVM = NULL; 1023 + CurrentMachine = NULL; 1024 + errBuffer = NULL; 1025 + GameFiber = NULL; 1026 + } 1027 + } 1028 + 1029 + static bool initJanet(tic_mem* tic, const char* code) 1030 + { 1031 + closeJanet(tic); 1032 + janet_init(); 1033 + 1034 + JanetTable *env = janet_core_env(NULL); 1035 + JanetTable *sub_env = janet_table(0); 1036 + janet_cfuns(sub_env, "tic80", janet_c_functions); 1037 + 1038 + // Provide the tic80 api as a module 1039 + Janet module_cache = janet_resolve_core("module/cache"); 1040 + janet_table_put(janet_unwrap_table(module_cache), janet_cstringv("tic80"), janet_wrap_table(sub_env)); 1041 + 1042 + tic_core* core = (tic_core*)tic; 1043 + CurrentMachine = core; 1044 + core->currentVM = (JanetTable*)janet_core_env(NULL); 1045 + 1046 + // override the dynamic err to a buffer, so that we can get errors later 1047 + errBuffer = janet_buffer(1028); 1048 + janet_setdyn("err", janet_wrap_buffer(errBuffer)); 1049 + 1050 + GameFiber = janet_current_fiber(); 1051 + Janet result; 1052 + 1053 + // Load the game source code 1054 + if (janet_dostring(core->currentVM, code, "main", &result)) { 1055 + reportError(core, result); 1056 + return false; 1057 + } 1058 + 1059 + return true; 1060 + } 1061 + 1062 + 1063 + static void evalJanet(tic_mem* tic, const char* code) 1064 + { 1065 + tic_core* core = (tic_core*)tic; 1066 + 1067 + Janet result = janet_wrap_nil(); 1068 + if (janet_dostring(core->currentVM, code, "main", &result)) { 1069 + reportError(core, result); 1070 + } 1071 + } 1072 + 1073 + 1074 + /* 1075 + * Find a function called TIC_FN and execute it. If we can't find it, then 1076 + * it is a problem. 1077 + */ 1078 + static void callJanetTick(tic_mem* tic) 1079 + { 1080 + tic_core* core = (tic_core*)tic; 1081 + 1082 + // Load the TIC function 1083 + Janet pre_fn; 1084 + (void)janet_resolve(core->currentVM, janet_csymbol(TIC_FN), &pre_fn); 1085 + 1086 + if (janet_type(pre_fn) != JANET_FUNCTION) { 1087 + core->data->error(core->data->data, "(TIC) isn't found :("); 1088 + return; 1089 + } 1090 + 1091 + JanetFunction *tic_fn = janet_unwrap_function(pre_fn); 1092 + Janet result = janet_wrap_nil(); 1093 + JanetSignal status = janet_pcall(tic_fn, 0, NULL, &result, &GameFiber); 1094 + 1095 + if (status != JANET_SIGNAL_OK) { 1096 + reportError(core, result); 1097 + } 1098 + } 1099 + 1100 + /* 1101 + * Find a function called BOOT_FN and execute it. If we can't find it, then 1102 + * it's not a problem. 1103 + */ 1104 + static void callJanetBoot(tic_mem* tic) 1105 + { 1106 + tic_core* core = (tic_core*)tic; 1107 + 1108 + Janet pre_fn; 1109 + (void)janet_resolve(core->currentVM, janet_csymbol(BOOT_FN), &pre_fn); 1110 + 1111 + if (janet_type(pre_fn) != JANET_FUNCTION) { 1112 + return; 1113 + } 1114 + 1115 + Janet result = janet_wrap_nil(); 1116 + JanetFunction *boot_fn = janet_unwrap_function(pre_fn); 1117 + JanetSignal status = janet_pcall(boot_fn, 0, NULL, &result, &GameFiber); 1118 + 1119 + if (status != JANET_SIGNAL_OK) { 1120 + reportError(core, result); 1121 + } 1122 + } 1123 + 1124 + /* 1125 + * Find a function with the given name and execute it with the given value. 1126 + * If we can't find it, then it's not a problem. 1127 + */ 1128 + static void callJanetIntCallback(tic_mem* tic, s32 value, void* data, const char* name) 1129 + { 1130 + tic_core* core = (tic_core*)tic; 1131 + 1132 + Janet pre_fn; 1133 + (void)janet_resolve(core->currentVM, janet_csymbol(name), &pre_fn); 1134 + 1135 + if (janet_type(pre_fn) != JANET_FUNCTION) { 1136 + return; 1137 + } 1138 + 1139 + Janet result = janet_wrap_nil(); 1140 + Janet argv[] = { janet_wrap_integer(value), }; 1141 + JanetFunction *fn = janet_unwrap_function(pre_fn); 1142 + JanetSignal status = janet_pcall(fn, 1, argv, &result, &GameFiber); 1143 + 1144 + if (status != JANET_SIGNAL_OK) { 1145 + reportError(core, result); 1146 + } 1147 + } 1148 + 1149 + static void callJanetScanline(tic_mem* tic, s32 row, void* data) 1150 + { 1151 + callJanetIntCallback(tic, row, data, SCN_FN); 1152 + callJanetIntCallback(tic, row, data, "scanline"); 1153 + } 1154 + 1155 + static void callJanetBorder(tic_mem* tic, s32 row, void* data) 1156 + { 1157 + callJanetIntCallback(tic, row, data, BDR_FN); 1158 + } 1159 + 1160 + static void callJanetMenu(tic_mem* tic, s32 index, void* data) 1161 + { 1162 + callJanetIntCallback(tic, index, data, MENU_FN); 1163 + } 1164 + 1165 + static const tic_outline_item* getJanetOutline(const char* code, s32* size) 1166 + { 1167 + enum{Size = sizeof(tic_outline_item)}; 1168 + 1169 + *size = 0; 1170 + 1171 + static tic_outline_item* items = NULL; 1172 + 1173 + if(items) 1174 + { 1175 + free(items); 1176 + items = NULL; 1177 + } 1178 + 1179 + const char* ptr = code; 1180 + 1181 + while(true) 1182 + { 1183 + static const char FuncString[] = "(defn "; 1184 + 1185 + ptr = strstr(ptr, FuncString); 1186 + 1187 + if(ptr) 1188 + { 1189 + ptr += sizeof FuncString - 1; 1190 + 1191 + const char* start = ptr; 1192 + const char* end = start; 1193 + 1194 + while(*ptr) 1195 + { 1196 + char c = *ptr; 1197 + 1198 + if(c == ' ' || c == '\t' || c == '\n' || c == '[') 1199 + { 1200 + end = ptr; 1201 + break; 1202 + } 1203 + 1204 + ptr++; 1205 + } 1206 + 1207 + if(end > start) 1208 + { 1209 + items = realloc(items, (*size + 1) * Size); 1210 + 1211 + items[*size].pos = start; 1212 + items[*size].size = (s32)(end - start); 1213 + 1214 + (*size)++; 1215 + } 1216 + } 1217 + else break; 1218 + } 1219 + 1220 + return items; 1221 + } 1222 + 1223 + /* ***************** */ 1224 + 1225 + const tic_script_config JanetSyntaxConfig = 1226 + { 1227 + .id = 18, 1228 + .name = "janet", 1229 + .fileExtension = ".janet", 1230 + .projectComment = "#", 1231 + .init = initJanet, 1232 + .close = closeJanet, 1233 + .tick = callJanetTick, 1234 + .boot = callJanetBoot, 1235 + 1236 + .callback = 1237 + { 1238 + .scanline = callJanetScanline, 1239 + .border = callJanetBorder, 1240 + .menu = callJanetMenu, 1241 + }, 1242 + 1243 + .getOutline = getJanetOutline, 1244 + .eval = evalJanet, 1245 + 1246 + .blockCommentStart = NULL, 1247 + .blockCommentEnd = NULL, 1248 + .blockCommentStart2 = NULL, 1249 + .blockCommentEnd2 = NULL, 1250 + .singleComment = "#", 1251 + .blockStringStart = NULL, 1252 + .blockStringEnd = NULL, 1253 + .blockEnd = NULL, 1254 + 1255 + .keywords = JanetKeywords, 1256 + .keywordsCount = COUNT_OF(JanetKeywords), 1257 + }; 1258 + 1259 + #endif /* defined(TIC_BUILD_WITH_JANET) */
+50 -44
src/api/wren.c
··· 115 115 foreign static music()\n\ 116 116 foreign static music(track)\n\ 117 117 foreign static music(track, frame)\n\ 118 - foreign static music(track, frame, loop)\n\ 119 - foreign static music(track, frame, loop, sustain)\n\ 118 + foreign static music(track, frame, row)\n\ 119 + foreign static music(track, frame, row, loop)\n\ 120 + foreign static music(track, frame, row, loop, sustain)\n\ 121 + foreign static music(track, frame, row, loop, sustain, tempo)\n\ 122 + foreign static music(track, frame, row, loop, sustain, tempo, speed)\n\ 120 123 foreign static time()\n\ 121 124 foreign static tstamp()\n\ 122 125 foreign static vbank()\n\ ··· 216 219 { 217 220 tic_core* core = (tic_core*)tic; 218 221 if(core->currentVM) 219 - { 222 + { 220 223 // release handles 221 224 if (loaded) 222 225 { ··· 227 230 wrenReleaseHandle(core->currentVM, border_handle); 228 231 wrenReleaseHandle(core->currentVM, menu_handle); 229 232 wrenReleaseHandle(core->currentVM, overline_handle); 230 - if (game_class != NULL) 233 + if (game_class != NULL) 231 234 { 232 235 wrenReleaseHandle(core->currentVM, game_class); 233 236 } ··· 261 264 { 262 265 s32 index = getWrenNumber(vm, 1); 263 266 264 - if(index < 0 || index >= TIC_MAP_WIDTH * TIC_MAP_HEIGHT) 267 + if(index < 0 || index >= TIC_MAP_WIDTH * TIC_MAP_HEIGHT) 265 268 { 266 269 wrenSetSlotDouble(vm, 0, 0); 267 270 return; ··· 292 295 bool pressed = tic_api_btn(tic, getWrenNumber(vm, 1) & 0x1f); 293 296 wrenSetSlotBool(vm, 0, pressed); 294 297 } 295 - 298 + 296 299 } 297 300 298 301 static void wren_btnp(WrenVM* vm) 299 - { 302 + { 300 303 tic_core* core = getWrenCore(vm); 301 304 tic_mem* tic = (tic_mem*)core; 302 305 ··· 519 522 } 520 523 521 524 static void wren_spr(WrenVM* vm) 522 - { 525 + { 523 526 s32 top = wrenGetSlotCount(vm); 524 527 525 528 s32 index = 0; ··· 533 536 static u8 colors[TIC_PALETTE_SIZE]; 534 537 s32 count = 0; 535 538 536 - if(top > 1) 539 + if(top > 1) 537 540 { 538 541 index = getWrenNumber(vm, 1); 539 542 ··· 562 565 } 563 566 } 564 567 } 565 - else 568 + else 566 569 { 567 570 colors[0] = getWrenNumber(vm, 4); 568 571 count = 1; ··· 597 600 tic_api_spr(tic, index, x, y, w, h, colors, count, scale, flip, rotate); 598 601 } 599 602 600 - static void wren_spr_internal(WrenVM* vm) 601 - { 603 + static void wren_spr_internal(WrenVM* vm) 604 + { 602 605 s32 top = wrenGetSlotCount(vm); 603 606 604 607 s32 index = getWrenNumber(vm, 1); ··· 607 610 608 611 static u8 colors[TIC_PALETTE_SIZE]; 609 612 s32 count = 0; 610 - 613 + 611 614 if(isList(vm, 4)) 612 615 { 613 616 wrenEnsureSlots(vm, top+1); ··· 626 629 } 627 630 } 628 631 } 629 - else 632 + else 630 633 { 631 634 colors[0] = getWrenNumber(vm, 4); 632 635 count = 1; ··· 655 658 656 659 s32 top = wrenGetSlotCount(vm); 657 660 658 - if(top > 2) 661 + if(top > 2) 659 662 { 660 663 x = getWrenNumber(vm, 1); 661 664 y = getWrenNumber(vm, 2); ··· 690 693 } 691 694 } 692 695 } 693 - else 696 + else 694 697 { 695 698 colors[0] = getWrenNumber(vm, 7); 696 699 count = 1; ··· 722 725 } 723 726 724 727 static void wren_mget(WrenVM* vm) 725 - { 728 + { 726 729 s32 x = getWrenNumber(vm, 1); 727 730 s32 y = getWrenNumber(vm, 2); 728 731 ··· 732 735 wrenSetSlotDouble(vm, 0, value); 733 736 } 734 737 735 - static struct 738 + static struct 736 739 { 737 740 float z[3]; 738 741 bool on; ··· 775 778 src = getWrenNumber(vm, 13); 776 779 } 777 780 778 - // check for chroma 781 + // check for chroma 779 782 if(isList(vm, 14)) 780 783 { 781 784 wrenEnsureSlots(vm, top+1); ··· 794 797 } 795 798 } 796 799 } 797 - else 800 + else 798 801 { 799 802 colors[0] = getWrenNumber(vm, 14); 800 803 count = 1; 801 804 } 802 805 803 - tic_api_ttri(tic, 806 + tic_api_ttri(tic, 804 807 pt[0], pt[1], // xy 1 805 808 pt[2], pt[3], // xy 2 806 809 pt[4], pt[5], // xy 3 ··· 817 820 818 821 s32 x = getWrenNumber(vm, 1); 819 822 s32 y = getWrenNumber(vm, 2); 820 - 823 + 821 824 tic_mem* tic = (tic_mem*)getWrenCore(vm); 822 825 823 826 if(top > 3) ··· 921 924 } 922 925 923 926 static void wren_tri(WrenVM* vm) 924 - { 927 + { 925 928 float pt[6]; 926 929 927 930 for(s32 i = 0; i < COUNT_OF(pt); i++) 928 931 { 929 932 pt[i] = (float)wrenGetSlotDouble(vm, i + 1); 930 933 } 931 - 934 + 932 935 s32 color = getWrenNumber(vm, 7); 933 936 934 937 tic_mem* tic = (tic_mem*)getWrenCore(vm); ··· 937 940 } 938 941 939 942 static void wren_trib(WrenVM* vm) 940 - { 943 + { 941 944 float pt[6]; 942 945 943 946 for(s32 i = 0; i < COUNT_OF(pt); i++) 944 947 { 945 948 pt[i] = (float)wrenGetSlotDouble(vm, i + 1); 946 949 } 947 - 950 + 948 951 s32 color = getWrenNumber(vm, 7); 949 952 950 953 tic_mem* tic = (tic_mem*)getWrenCore(vm); ··· 970 973 if(top == 1) 971 974 { 972 975 tic_api_clip(tic, 0, 0, TIC80_WIDTH, TIC80_HEIGHT); 973 - } 974 - else 976 + } 977 + else 975 978 { 976 979 s32 x = getWrenNumber(vm, 1); 977 980 s32 y = getWrenNumber(vm, 2); ··· 1168 1171 { 1169 1172 wrenGetListElement(vm, 5, i, top); 1170 1173 if(isNumber(vm, top)) 1171 - volumes[i] = getWrenNumber(vm, top); 1174 + volumes[i] = getWrenNumber(vm, top); 1172 1175 } 1173 1176 } 1174 1177 else volumes[0] = volumes[1] = getWrenNumber(vm, 5); ··· 1178 1181 speed = getWrenNumber(vm, 6); 1179 1182 } 1180 1183 } 1181 - } 1184 + } 1182 1185 } 1183 1186 } 1184 1187 1185 1188 if (channel >= 0 && channel < TIC_SOUND_CHANNELS) 1186 1189 { 1187 1190 tic_api_sfx(tic, index, note, octave, duration, channel, volumes[0] & 0xf, volumes[1] & 0xf, speed); 1188 - } 1191 + } 1189 1192 else wrenError(vm, "unknown channel\n"); 1190 1193 } 1191 1194 else wrenError(vm, "unknown sfx index\n"); ··· 1194 1197 static void wren_music(WrenVM* vm) 1195 1198 { 1196 1199 s32 top = wrenGetSlotCount(vm); 1197 - 1200 + 1198 1201 tic_mem* tic = (tic_mem*)getWrenCore(vm); 1199 1202 1200 1203 s32 track = -1; ··· 1252 1255 static void wren_time(WrenVM* vm) 1253 1256 { 1254 1257 tic_mem* tic = (tic_mem*)getWrenCore(vm); 1255 - 1258 + 1256 1259 wrenSetSlotDouble(vm, 0, tic_api_time(tic)); 1257 1260 } 1258 1261 ··· 1447 1450 if (strcmp(signature, "static TIC.music(_,_)" ) == 0) return wren_music; 1448 1451 if (strcmp(signature, "static TIC.music(_,_,_)" ) == 0) return wren_music; 1449 1452 if (strcmp(signature, "static TIC.music(_,_,_,_)" ) == 0) return wren_music; 1453 + if (strcmp(signature, "static TIC.music(_,_,_,_,_)" ) == 0) return wren_music; 1454 + if (strcmp(signature, "static TIC.music(_,_,_,_,_,_)" ) == 0) return wren_music; 1455 + if (strcmp(signature, "static TIC.music(_,_,_,_,_,_,_)" ) == 0) return wren_music; 1450 1456 1451 1457 if (strcmp(signature, "static TIC.time()" ) == 0) return wren_time; 1452 1458 if (strcmp(signature, "static TIC.tstamp()" ) == 0) return wren_tstamp; ··· 1476 1482 static WrenForeignMethodFn bindForeignMethod( 1477 1483 WrenVM* vm, const char* module, const char* className, 1478 1484 bool isStatic, const char* signature) 1479 - { 1485 + { 1480 1486 if (strcmp(module, "main") != 0) return NULL; 1481 1487 1482 1488 // For convenience, concatenate all of the method qualifiers into a single signature string. 1483 1489 char fullName[256]; 1484 1490 fullName[0] = '\0'; 1485 - if (isStatic) 1491 + if (isStatic) 1486 1492 { 1487 1493 strcat(fullName, "static "); 1488 1494 } ··· 1499 1505 wrenSetUserData(core->currentVM, core); 1500 1506 1501 1507 if (wrenInterpret(core->currentVM, "main", tic_wren_api) != WREN_RESULT_SUCCESS) 1502 - { 1508 + { 1503 1509 core->data->error(core->data->data, "can't load TIC wren api"); 1504 1510 } 1505 1511 } ··· 1520 1526 core->data->error(core->data->data, buffer); 1521 1527 } 1522 1528 1523 - static void writeFn(WrenVM* vm, const char* text) 1529 + static void writeFn(WrenVM* vm, const char* text) 1524 1530 { 1525 1531 tic_core* core = getWrenCore(vm); 1526 1532 u8 color = tic_color_dark_blue; ··· 1532 1538 tic_core* core = (tic_core*)tic; 1533 1539 closeWren(tic); 1534 1540 1535 - WrenConfiguration config; 1541 + WrenConfiguration config; 1536 1542 wrenInitConfiguration(&config); 1537 1543 1538 1544 config.bindForeignMethodFn = bindForeignMethod; ··· 1543 1549 WrenVM* vm = core->currentVM = wrenNewVM(&config); 1544 1550 1545 1551 initAPI(core); 1546 - 1552 + 1547 1553 if (wrenInterpret(core->currentVM, "main", code) != WREN_RESULT_SUCCESS) 1548 1554 { 1549 1555 return false; ··· 1554 1560 // make handles 1555 1561 wrenEnsureSlots(vm, 1); 1556 1562 wrenGetVariable(vm, "main", "Game", 0); 1557 - game_class = wrenGetSlotHandle(vm, 0); // handle from game class 1563 + game_class = wrenGetSlotHandle(vm, 0); // handle from game class 1558 1564 1559 1565 new_handle = wrenMakeCallHandle(vm, "new()"); 1560 1566 update_handle = wrenMakeCallHandle(vm, TIC_FN "()"); ··· 1572 1578 wrenCall(vm, new_handle); 1573 1579 wrenReleaseHandle(core->currentVM, game_class); // release game class handle 1574 1580 game_class = NULL; 1575 - if (wrenGetSlotCount(vm) == 0) 1581 + if (wrenGetSlotCount(vm) == 0) 1576 1582 { 1577 1583 core->data->error(core->data->data, "Error in game class :("); 1578 1584 return false; 1579 1585 } 1580 - game_class = wrenGetSlotHandle(vm, 0); // handle from game object 1586 + game_class = wrenGetSlotHandle(vm, 0); // handle from game object 1581 1587 } else { 1582 - core->data->error(core->data->data, "'Game class' isn't found :("); 1588 + core->data->error(core->data->data, "'Game class' isn't found :("); 1583 1589 return false; 1584 1590 } 1585 1591 ··· 1727 1733 wrenInterpret(core->currentVM, "main", code); 1728 1734 } 1729 1735 1730 - tic_script_config WrenSyntaxConfig = 1736 + tic_script_config WrenSyntaxConfig = 1731 1737 { 1732 1738 .id = 16, 1733 1739 .name = "wren",
+12 -5
src/core/languages.c
··· 37 37 extern tic_script_config WasmSyntaxConfig; 38 38 #endif 39 39 40 + #if defined(TIC_BUILD_WITH_JANET) 41 + extern tic_script_config JanetSyntaxConfig; 42 + #endif 43 + 40 44 41 45 tic_script_config* Languages[] = { 42 46 ··· 44 48 &LuaSyntaxConfig, 45 49 #endif 46 50 47 - #if defined(TIC_BUILD_WITH_MRUBY) 48 - &MRubySyntaxConfig, 49 - #endif 51 + #if defined(TIC_BUILD_WITH_MRUBY) 52 + &MRubySyntaxConfig, 53 + #endif 50 54 51 55 #if defined(TIC_BUILD_WITH_JS) 52 56 &JsSyntaxConfig, ··· 72 76 &WrenSyntaxConfig, 73 77 #endif 74 78 75 - #if defined(TIC_BUILD_WITH_WASM) 79 + #if defined(TIC_BUILD_WITH_WASM) 76 80 &WasmSyntaxConfig, 77 81 #endif 78 82 83 + #if defined(TIC_BUILD_WITH_JANET) 84 + &JanetSyntaxConfig, 85 + #endif 86 + 79 87 NULL}; 80 -
+27 -3
src/studio/demos.c
··· 199 199 200 200 #endif 201 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 + 202 225 tic_script_config_extra* getConfigExtra(const tic_script_config* config) 203 226 { 204 227 205 - for (tic_script_config_extra** conf = LanguagesExtra ; *conf != NULL; conf++ ) { 228 + for (tic_script_config_extra** conf = LanguagesExtra ; *conf != NULL; conf++ ) { 206 229 tic_script_config_extra* ln = *conf; 207 230 if (strcmp(config->name, ln->name) == 0) 208 231 { ··· 241 264 #if defined(TIC_BUILD_WITH_WASM) 242 265 &WasmSyntaxConfigExtra, 243 266 #endif 267 + #if defined(TIC_BUILD_WITH_JANET) 268 + &JanetSyntaxConfigExtra, 269 + #endif 244 270 NULL 245 271 }; 246 - 247 -
+1 -1
src/studio/screens/console.c
··· 3028 3028 {offsetof(tic_ram, font.alt), "ALT FONT"}, 3029 3029 {offsetof(tic_ram, font.alt.params), "ALT FONT PARAMS"}, 3030 3030 {offsetof(tic_ram, mapping), "BUTTONS MAPPING"}, 3031 - {offsetof(tic_ram, free), "... (free)"}, 3031 + {offsetof(tic_ram, free), "** RESERVED **"}, 3032 3032 {TIC_RAM_SIZE, ""}, 3033 3033 }; 3034 3034