diff options
Diffstat (limited to 'src/main/smp')
| -rw-r--r-- | src/main/smp/sys/audio.md | 6 | ||||
| -rw-r--r-- | src/main/smp/sys/draw/README.md | 4 | ||||
| -rw-r--r-- | src/main/smp/sys/gfx.md | 12 | ||||
| -rw-r--r-- | src/main/smp/sys/time/README.md | 6 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/main/smp/sys/audio.md b/src/main/smp/sys/audio.md index bb2ad77c..ba02e4d9 100644 --- a/src/main/smp/sys/audio.md +++ b/src/main/smp/sys/audio.md @@ -1,6 +1,6 @@ # Optional background audio -[Chapter 31](../../../../README.md#graphics-and-sound) introduces the library. +[Chapter 31](../../../../../chapter31/README.md#graphics-and-sound) introduces the library. The Simple API is implemented in [audio.smp](audio.smp), with the native adapter in [simple_miniaudio.c](../../c/simple_miniaudio.c). @@ -9,7 +9,7 @@ optional native C backend. Playback runs on its own thread; the game keeps processing input and drawing. No Python, CMake, codec packages, or sound files are needed. Default builds/tests never download miniaudio or open a device. -From `chapter31`: +From `chapter32`: ```sh make libs # Once while online @@ -21,7 +21,7 @@ The last command builds both optional backends and runs a tictactoe game with sounds. Accepted moves get a quiet 70ms sine boop. A player win gets a 480ms rising C-E-G celebration; a CPU win reverses the notes -For direct execution from `chapter31`, configure both backends and launch the +For direct execution from `chapter32`, configure both backends and launch the game using your shell. PowerShell: diff --git a/src/main/smp/sys/draw/README.md b/src/main/smp/sys/draw/README.md index 7d3bf6c8..c1b91ac1 100644 --- a/src/main/smp/sys/draw/README.md +++ b/src/main/smp/sys/draw/README.md @@ -1,6 +1,6 @@ # Drawing in Simple -[Chapter 31](../../../../../README.md#graphics-and-sound) introduces the library. +[Chapter 31](../../../../../../chapter31/README.md#graphics-and-sound) introduces the library. The implementation is in [Canvas.smp](Canvas.smp), [Button.smp](Button.smp), and the [draw module](../draw.smp). @@ -93,7 +93,7 @@ and a Space shortcut in the same single-threaded loop. ## Graphical tic-tac-toe -From `chapter31`: +From `chapter32`: ```sh make run-graphical-tictactoe diff --git a/src/main/smp/sys/gfx.md b/src/main/smp/sys/gfx.md index 931d985f..61a2aba5 100644 --- a/src/main/smp/sys/gfx.md +++ b/src/main/smp/sys/gfx.md @@ -1,6 +1,6 @@ # Optional graphics -[Chapter 31](../../../../README.md#graphics-and-sound) introduces the library. +[Chapter 31](../../../../../chapter31/README.md#graphics-and-sound) introduces the library. The Simple API is implemented in [gfx.smp](gfx.smp), with the window adapter in [simple_minifb.c](../../c/simple_minifb.c). @@ -15,7 +15,7 @@ The game run target also builds optional [background audio](audio.md). ## Default: no graphics dependency -From `chapter31`, the usual `make release`, `make tests`, and `make tictactoe` +From `chapter32`, the usual `make release`, `make tests`, and `make tictactoe` need no MiniFB, graphics headers, OpenGL, CMake, or running display. Nothing downloads dependencies unless you explicitly request `make libs` or `make init` (`make lib` remains a setup alias). Build and run targets never use the network. @@ -32,7 +32,7 @@ the process. Non-graphics programs ignore even a broken graphics configuration. ## Build the optional backend -From `chapter31`: +From `chapter32`: ```sh make libs # Once while online; fills the persistent lib/ cache. @@ -68,7 +68,7 @@ also demonstrates the diagnostic and exit status 1 when graphics is absent. or release Escape to exit. Passing any argument to the executable makes it close after five polling iterations, for a quick smoke test. -To run directly from `chapter31` in PowerShell: +To run directly from `chapter32` in PowerShell: ```powershell $env:SIMPLE_MINIFB = (Resolve-Path build/release/x86_64_v2_win64/simple_minifb.dll).Path @@ -92,7 +92,7 @@ export SIMPLE_MINIFB="$PWD/build/release/x86_64_v2_win64/simple_minifb.dll" For WSL, from the repository root: ```sh -wsl -d Ubuntu-24.04 -- bash -lc 'cd chapter31 && make graphics graphics-example CLZDIR=build/classes-linux' +wsl -d Ubuntu-24.04 -- bash -lc 'cd chapter32 && make graphics graphics-example CLZDIR=build/classes-linux' ``` Inside WSL, set `SIMPLE_MINIFB` to the full path of the Linux `.so`, then run @@ -107,7 +107,7 @@ With no `SIMPLE_MINIFB` setting, the runtime searches beside the executable, then its `../../release/<ABI>` and `../release/<ABI>` directories. These cover the examples and test build layouts regardless of the current directory. It also checks the current directory, `build/release/<ABI>`, and -`chapter31/build/release/<ABI>` relative to the current directory. Thus built +`chapter32/build/release/<ABI>` relative to the current directory. Thus built examples such as `Clock.exe` can be launched directly without configuration. `SIMPLE_MINIFB` overrides discovery; an invalid explicit path reports an error diff --git a/src/main/smp/sys/time/README.md b/src/main/smp/sys/time/README.md index baa920cb..602015e9 100644 --- a/src/main/smp/sys/time/README.md +++ b/src/main/smp/sys/time/README.md @@ -1,6 +1,6 @@ # Time and single-threaded animation -[Chapter 31](../../../../../README.md#time-library) introduces the library. +[Chapter 31](../../../../../../chapter31/README.md#time-library) introduces the library. The implementation is in [time.smp](../time.smp), [DateTime.smp](DateTime.smp), and [Timers.smp](Timers.smp). @@ -122,8 +122,8 @@ The [digital and analog clock example](../../../../../docs/examples/Clock.smp) c the repository root, with graphics dependencies already cached: ```sh -make -C chapter31 clock-example # Build without opening a window. -make -C chapter31 run-clock # Build the backend and run. +make -C chapter32 clock-example # Build without opening a window. +make -C chapter32 run-clock # Build the backend and run. ``` Click the button or press Space to switch between green seven-segment digits |
