Scheme playground.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.5 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Interscheme
  2. A pixel graphics and sound playground using SDL2 and chibi-scheme.
  3. WIP.
  4. See also: http://synthcode.com/scheme/chibi/#h3_QuickStart
  5. ## Build
  6. Requirements:
  7. - Chibi Scheme
  8. - SDL2
  9. - SDL2 Mixer
  10. - SDL2 GFX
  11. First, build and install chibi-scheme:
  12. ```bash
  13. git clone https://github.com/ashinn/chibi-scheme.git
  14. cd chibi-scheme
  15. make -j$(nproc)
  16. sudo make install
  17. ```
  18. This will yield `libchibi-scheme.so` in `/usr/local/lib` and `/usr/local/include/chibi` header files. You might need to do `ldconfig /usr/local/lib` once.
  19. It will also make a scheme REPL called `chibi-scheme`.
  20. Then, in this here repo:
  21. ```bash
  22. ./build.sh
  23. ```
  24. ## Run
  25. Edit `init.scm` to your liking.
  26. ```bash
  27. ./interscheme
  28. ```
  29. ## Documentation
  30. Interscheme comes with several Scheme functions that are high-level
  31. wrappers to SDL functions. This is a complete list of
  32. readily-available functions (tagged with "no" or "yes" depending on
  33. whether or not the functionality is complete & working or not)
  34. - Graphical Functions
  35. - `(pixel-put x y #xffffff) ; yes`
  36. - `(stroke-line x1 y1 x2 y2 #xffffffff) ; yes`
  37. - `(pixel-rect-fill x1 y1 x2 y2 #xffffff) ; yes`
  38. - `(pixel-ellipse-fill x1 y1 x2 y2 #xffffff) ; no`
  39. - `(get-pixel-value x y) ; no`
  40. - `(set-fps n) ; no`
  41. - Audio Functions
  42. - `(play-wav-file "some_file.wav") ; yes`
  43. - `(generate-tone frequency duration) ; wip`
  44. - Input Functions
  45. - `(mouse-x) ; yes`
  46. - `(mouse-y) ; yes`
  47. - `(keyboard) ; yes`
  48. - `(mouse-buttons) ; yes`
  49. - `(joystick) ; no`
  50. Interscheme is documented in more detail in the Reform Handbook.