Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
0cc35ad
Add CF_POW and cf_pow math functions (#429)
pusewicz Nov 24, 2025
1440abe
Add CF_EXP and cf_exp math functions (#433)
pusewicz Dec 18, 2025
9add4b3
Fix cute_https for Cloudflare sites (#432)
bullno1 Dec 19, 2025
9bdb0a8
Send user-defined headers in cute_https (#434)
bullno1 Dec 20, 2025
8c76f31
Make cute_tls not on receive when using S2N_TLS (#435)
bullno1 Dec 22, 2025
403cbc8
Correctly handle GL_TEXTURE_MIN_FILTER on GLES when there is no mipma…
bullno1 Jan 8, 2026
3bbf388
Adding smooth uv toggle
RandyGaul Jan 15, 2026
e5f5e4b
Add way to disable smooth_uv function
RandyGaul Jan 15, 2026
8caf77f
Prototyping out draw filter API
RandyGaul Jan 15, 2026
9a950c5
Add footer navigation (#440)
pusewicz Jan 17, 2026
ade80de
Fix spelling mistakes (#442)
pusewicz Jan 17, 2026
c567e01
Split query by underscore (#441)
pusewicz Jan 17, 2026
3429423
Docs extensions (#443)
pusewicz Jan 17, 2026
724f6a2
Fix type conversions (#430)
pusewicz Jan 17, 2026
ec8649b
Fix generic for cf_make_translation and cf_atan2_360 in C (#425)
pusewicz Jan 17, 2026
3273915
Custom color/attribs for basic tri renders in draw API
RandyGaul Jan 17, 2026
aeb5f17
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Jan 17, 2026
4371ece
Add IMGUI texture sample (#444)
theopechli Jan 18, 2026
585c1a3
Spelling (#445)
pusewicz Jan 19, 2026
cb2a493
Add pause/unpause functions
RandyGaul Jan 21, 2026
748185f
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Jan 21, 2026
f281eef
Add missing include for cute_guid.h (#446)
pusewicz Jan 23, 2026
041264f
Use (void) in C function declarations with no parameters (#447)
pusewicz Jan 23, 2026
ebabf33
Remove unused shader file (#449)
pusewicz Jan 26, 2026
ce091b1
Explain coordinate systems (#448)
pusewicz Jan 26, 2026
c15f126
Cleanup enums (#450)
pusewicz Jan 26, 2026
5479a0f
wip, cute_sound v3
RandyGaul Feb 1, 2026
f5fdd5b
further wip cute_sound.h 3.0 cleanup
RandyGaul Feb 1, 2026
ee45f63
v3.0 cute_sound.h
RandyGaul Feb 1, 2026
ffabec1
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Feb 1, 2026
91f0c61
Upgrade spritebatch, and fail silently on linux for CI if no audio de…
RandyGaul Feb 2, 2026
bf2cf81
Update sample for window resizing
RandyGaul Feb 2, 2026
1c6f067
Merge branch 'master' of https://github.com/randygaul/cute_framework
RandyGaul Feb 2, 2026
17eed53
Android build support
RandyGaul Feb 3, 2026
367bab2
hook up android to sidebar/index
RandyGaul Feb 3, 2026
f71a88c
Change dpi_scale when notified via SDL event (#452)
pusewicz Feb 3, 2026
f2af7ad
Redirect old style documentation to new location (#451)
pusewicz Feb 3, 2026
5ae70aa
Bump SDL to 3.4.0 (#437)
pusewicz Feb 3, 2026
8275db0
Streamline Linux build (#454)
pusewicz Feb 3, 2026
672bc93
Unify docs job (#453)
pusewicz Feb 3, 2026
cf381c5
Fix dynlib builds on Windows (#457)
pusewicz Feb 4, 2026
3b11731
Enable SDL_CCACHE (#455)
pusewicz Feb 4, 2026
9bc7efe
v1.1.2 initial commit
RandyGaul Feb 5, 2026
b073d00
forgot ckit test file
RandyGaul Feb 5, 2026
435f97b
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Feb 5, 2026
8e0201a
Update build.yml
RandyGaul Feb 5, 2026
677a816
some build fixes
RandyGaul Feb 5, 2026
e6d2c01
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Feb 5, 2026
c32114b
more build fixes
RandyGaul Feb 5, 2026
1b28505
Remove debug output, add stdio for unit tests
RandyGaul Feb 5, 2026
4161a23
msvc ci struggling with pdbs... attempted fix
RandyGaul Feb 5, 2026
2b51768
CK_MAP -> CF_MAP
RandyGaul Feb 5, 2026
a218216
Build issues
RandyGaul Feb 5, 2026
6c06f2b
Double slashes for windows CIg
RandyGaul Feb 5, 2026
fee34d7
Trying to avoid ice on CI, and added cookie debug aids to ckit
RandyGaul Feb 5, 2026
6083b8b
2026 msvc
RandyGaul Feb 5, 2026
aca8117
Revert to 2022 for CI since 2026 isn't avialble yet
RandyGaul Feb 5, 2026
e711a39
Try and fix msvc flag escaping
RandyGaul Feb 5, 2026
d00d17e
Try single threaded mode
RandyGaul Feb 5, 2026
893fcbd
skip samples on msvc CI for now to try and avoid build issues
RandyGaul Feb 5, 2026
eccb6c9
cleanup docs link generation and broken links
RandyGaul Feb 5, 2026
688e874
More docs and naming fixes
RandyGaul Feb 5, 2026
f83e8cc
rename antialias to shape_aa
RandyGaul Feb 5, 2026
02c7fa4
remove extra cf_clear_canvas declaration
RandyGaul Feb 5, 2026
7416a52
rename aa -> shape_aa
RandyGaul Feb 5, 2026
4f8f9bb
build fix aa
RandyGaul Feb 5, 2026
c355979
Added missing C++ wrappers
RandyGaul Feb 6, 2026
4b79ec9
Fixup leftover name problems for ckit refactor
RandyGaul Feb 6, 2026
53cca85
Remaining build problems
RandyGaul Feb 6, 2026
02232db
Address d3d12 warning spam
RandyGaul Feb 6, 2026
939e188
Add proper GPU resource cleanup code to spritebatch
RandyGaul Feb 6, 2026
7cdf0dc
release cute_binding.h
RandyGaul Feb 6, 2026
2c575e3
Fix text rendering, and also add binding sample
RandyGaul Feb 6, 2026
c5b8c1d
Remove unneeded include
RandyGaul Feb 6, 2026
fd0e3e5
Use VS 2026 (#459)
pusewicz Feb 6, 2026
504b759
Circular deadzone, raw vals, binding repeats
RandyGaul Feb 6, 2026
58b7554
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Feb 6, 2026
c29828a
Comment tweaks
RandyGaul Feb 6, 2026
b4901dc
Update readme on docsparser
RandyGaul Feb 6, 2026
ef58e4b
SDL_Gpu layer bugfixes + optimizations
RandyGaul Feb 6, 2026
2b95997
Variety of small fixes, and fixed vertex texture support
RandyGaul Feb 6, 2026
311ef05
Fixed texture binding slot issue by tracking indices through shader r…
RandyGaul Feb 6, 2026
e8c5fbf
build fix
RandyGaul Feb 6, 2026
8055f1a
Configure ccache (#460)
pusewicz Feb 6, 2026
dd95a05
Fix easysprite caching bug
RandyGaul Feb 6, 2026
e5a7ce9
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Feb 6, 2026
4fe94fb
Fix draw command merging bugs
RandyGaul Feb 6, 2026
8d8739f
Use Ninja on Windows (#461)
pusewicz Feb 6, 2026
4c4e2ec
Address color parsing and converting inconsistencies
RandyGaul Feb 6, 2026
ba6b599
Compute shader support
RandyGaul Feb 7, 2026
5b88681
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Feb 7, 2026
1bec740
Bump version number (#464)
pusewicz Feb 7, 2026
8dded30
Support wider range of compilers and cleanup (#465)
pusewicz Feb 7, 2026
2787ea7
Docsparser (#466)
pusewicz Feb 7, 2026
90162b7
Fix header guard in cute_symbol.h (#469)
pusewicz Feb 8, 2026
338f9df
added .c_shd support as file type for shader directory/hotloading
RandyGaul Feb 9, 2026
ced8ff1
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Feb 9, 2026
12b6583
Only set CMake output dir if CF is the top level project (#471)
bullno1 Feb 10, 2026
b1d35fb
Ensure that ckit always use CF's allocator (#472)
bullno1 Feb 10, 2026
253c56a
Append dir when searching for shaders recursively (#473)
waldnercharles Feb 12, 2026
88bbf6e
hrc sample
RandyGaul Feb 12, 2026
01e98f6
Merge branch 'master' of https://github.com/RandyGaul/cute_framework
RandyGaul Feb 12, 2026
ab15add
Update hrc.c
RandyGaul Feb 12, 2026
f4c88eb
Update hrc_copy.c_shd
RandyGaul Feb 12, 2026
0ca7ae4
Update hrc_composite.c_shd
RandyGaul Feb 12, 2026
931ee41
Update hrc_extend.c_shd
RandyGaul Feb 12, 2026
667516c
Update hrc_merge.c_shd
RandyGaul Feb 12, 2026
b8c0a43
gpu readback
RandyGaul Feb 13, 2026
dfa4258
example in docs
RandyGaul Feb 13, 2026
8577384
fix example block
RandyGaul Feb 13, 2026
136aee3
Make the docs way more clear in the example this is *async*
RandyGaul Feb 13, 2026
798e691
gpu readback sample
RandyGaul Feb 13, 2026
3d6b3bc
Swap to cpp to avoid link complexity with cute_png.h
RandyGaul Feb 13, 2026
8d92084
Just expose a proper save png API through CF
RandyGaul Feb 13, 2026
2917356
Remove stale docs about debug dumping
RandyGaul Feb 13, 2026
995e902
Updated shader() API with ShaderParams struct
RandyGaul Feb 14, 2026
87eb102
remove oopsie files
RandyGaul Feb 14, 2026
0c9a3ea
Beef up docs pass
RandyGaul Feb 14, 2026
45c1fb2
Get pixels from sprite
RandyGaul Feb 15, 2026
caa4f21
Refactor CF_Sprite for easy hotloading, rename png cache to custom_sp…
RandyGaul Feb 17, 2026
d8ee4cc
Export some more internal functions for clang linker on the unit tests
RandyGaul Feb 17, 2026
209ceb6
Add shader reload functions to make hotloading simpler
RandyGaul Feb 17, 2026
189e962
Add emscripten build (#476)
pusewicz Feb 17, 2026
4555da4
Minor hrc fix and fix very old bug in builtin shader about texture sa…
RandyGaul Feb 17, 2026
6d696dd
Update HRC with 2x upscaling c-1 gathering and tracing c0-c2
RandyGaul Feb 18, 2026
83571f9
more wip hrc
RandyGaul Feb 18, 2026
1f6467d
minor tweak to tracer
RandyGaul Feb 18, 2026
2a745d4
Bugfix where drawing a canvas can swallow subsequent draw commands --…
RandyGaul Feb 18, 2026
9f2175b
hrc tweaks
RandyGaul Feb 18, 2026
0460e96
trying out minmax upscaling
RandyGaul Feb 18, 2026
8bdce28
add in more upscaling tests
RandyGaul Feb 18, 2026
01c2abd
more hrc testing options
RandyGaul Feb 19, 2026
05df187
Optimize common draw hot paths for debug perf (inlining)
RandyGaul Feb 19, 2026
a74d577
optimize sintern
RandyGaul Feb 19, 2026
01be79b
Add generation counter to try and avoid dangling sinuke cache pointers
RandyGaul Feb 19, 2026
accb6c2
Added sprite blend for ase layer compositing
RandyGaul Feb 22, 2026
c4e5b9e
Add cf_gpu_sync (#478)
waldnercharles Feb 23, 2026
5c3cc59
Generate samples pages in documentation (#481)
pusewicz Mar 1, 2026
9b93cfe
Add CF API review skills and hooks (#482)
pusewicz Mar 1, 2026
6413a3d
Update and cleanup headers (#483)
pusewicz Mar 1, 2026
5da337e
Fix doc builds (#484)
pusewicz Mar 1, 2026
a611d6f
Extract cmake action (#485)
pusewicz Mar 1, 2026
70784fa
Migrate to zensical
pusewicz Mar 2, 2026
976935e
Disable caching as per recommendation
pusewicz Mar 2, 2026
dcb65a5
Update documentation
pusewicz Mar 2, 2026
407bee7
Add requirements.txt
pusewicz Mar 2, 2026
2d80844
Add info about venv
pusewicz Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .claude/agents/cf-api-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: cf-api-reviewer
description: Reviews Cute Framework public API headers for convention compliance. Use after creating or significantly modifying any file in include/.
color: cyan
---

You are a specialized code reviewer for Cute Framework's public C/C++ API conventions.

**Generated files** — `*_shd.h` files are produced by `build/cute-shaderc` and must not be reviewed or edited. All other `include/cute_*.h` files, including `cute_shader_bytecode.h`, are hand-written and subject to these rules.

When asked to review a header file, check ALL of the following and report only actual violations (not passing items):

**1. Copyright header** — First comment block must match exactly:
```
/*
Cute Framework
Copyright (C) 2024 Randy Gaul https://randygaul.github.io/

This software is dual-licensed with zlib or Unlicense, check LICENSE.txt for more info
*/
```

**2. Include guard** — Must be `CF_<NAME>_H` where `<NAME>` = filename with `cute_` stripped, uppercased.
- `cute_physics.h` → `CF_PHYSICS_H`
- `cute.h` → `CF_H`

**3. extern "C" wrapping** — All C declarations must be inside:
```c
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
...
#ifdef __cplusplus
}
#endif // __cplusplus
```

**4. Function naming** — Every public C function must start with `cf_`.

**5. Type naming** — Every public struct, enum, and typedef must start with `CF_`.

**6. Lifecycle verbs** — Creation uses `cf_make_<name>`, destruction uses `cf_destroy_<name>`. Flag other patterns.

**7. Deprecation pattern** — Deprecated symbols must have `@deprecated` in their doc comment. The deprecated name must be a `CF_INLINE` forwarder to the new name (or vice versa).

**8. Documentation** — All public declarations must have `/** ... */` block comments (never `///`). Each interior line starts with ` * `. Required tags and order:
1. `@function` / `@struct` / `@enum` — declaration kind, value is the symbol name
2. `@category` — functional grouping (e.g. `graphics`, `audio`, `sprite`, `allocator`)
3. `@brief` — one-line description
4. `@param` — one per parameter, name padded so descriptions align; omit if none
5. `@return` — omit for `void`
6. `@remarks` — optional extended notes; continuation lines align with first word; embedded code uses fenced ` ```c ``` ` blocks
7. `@example` — optional; title follows `>`, code lines are indented (no backtick fences)
8. `@related` — space-separated symbol list on one line (highly recommended)

Additional inline annotation rules:
- Struct members: `/* @member Description. */` before each field; typedef followed by `// @end`
- Enum values in X-macro blocks: `/* @entry Description. */` before each `CF_ENUM(...)` line, with `/* @end */` as the final entry

**9. C++ wrappers** — A `namespace Cute` section should exist for non-trivial APIs.

**10. Include style** — CF headers use quotes (`"cute_defines.h"`), system/SDL use angle brackets (`<SDL3/SDL.h>`).

**11. cute.h** — If the header is new, check that it's been added to `include/cute.h` in a manner consistent with that file's existing grouping/ordering (do not assume strict global alphabetical order).

**12. CMakeLists.txt** — If a new source file `cute_<name>.cpp` was created, check that it's been added to the `CF_SRCS` source list in the repository root `CMakeLists.txt`.

Report each violation with `filename:line` where possible. Be concise — list only violations.
23 changes: 23 additions & 0 deletions .claude/hooks/block-generated-files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python3
"""PreToolUse hook: blocks edits to generated shader headers (*_shd.h).

Only files ending in _shd.h are generated by build/cute-shaderc.
cute_shader_bytecode.h is hand-written and NOT blocked.
"""
import sys
import json
import os

data = json.load(sys.stdin)
tool_input = data.get("tool_input", {})
file_path = tool_input.get("file_path", "")

if file_path:
name = os.path.basename(file_path)
if name.endswith("_shd.h"):
print(
f"Blocked: '{name}' is a generated file. "
"Regenerate with build/cute-shaderc instead of editing manually.",
file=sys.stderr,
)
sys.exit(2)
35 changes: 35 additions & 0 deletions .claude/hooks/check-include-guard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python3
"""PostToolUse hook: warns when an include/ header is missing its expected CF_*_H guard."""
import sys
import json
import os

data = json.load(sys.stdin)
tool_input = data.get("tool_input", {})
file_path = tool_input.get("file_path", "")

norm = os.path.normpath(file_path)
parts = norm.split(os.sep)
if "include" in parts and file_path.endswith(".h"):
name = os.path.basename(file_path) # e.g. "cute_graphics.h"
base = name[:-2] # strip ".h"

if base.startswith("cute_"):
rest = base[5:] # "cute_graphics" -> "graphics"
elif base == "cute":
rest = ""
else:
rest = base

expected = f"CF_{rest.upper()}_H" if rest else "CF_H"

try:
with open(file_path) as f:
content = f.read()
if expected not in content:
print(
f"WARNING: {name} is missing expected include guard '{expected}'.",
file=sys.stderr,
)
except OSError:
pass
26 changes: 26 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "python3 .claude/hooks/block-generated-files.py"
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "python3 .claude/hooks/check-include-guard.py"
}
]
}
]
}
}
211 changes: 211 additions & 0 deletions .claude/skills/header-api-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
---
name: header-api-review
description: Cute Framework public header conventions and review checklist. Reference before creating or modifying any file in include/.
user-invocable: false
---

# CF Header Conventions

## File Naming
- Public headers: `cute_<name>.h` in `include/`
- Source files: `cute_<name>.cpp` in `src/`

## Generated vs Hand-Written Headers
- **Generated** (do NOT edit manually): `*_shd.h` shader bytecode files produced by `build/cute-shaderc`
- **Hand-written** (edit normally): all other `include/cute_*.h` files, including `cute_shader_bytecode.h` which defines shared shader structures and is NOT generated

## Include Guards
Format: `CF_<NAME>_H` where `<NAME>` is the filename with `cute_` prefix stripped, uppercased.
- `cute_graphics.h` → `CF_GRAPHICS_H`
- `cute_sprite.h` → `CF_SPRITE_H`
- `cute.h` → `CF_H`

## Copyright Header
Every file must begin with exactly:
```
/*
Cute Framework
Copyright (C) 2024 Randy Gaul https://randygaul.github.io/

This software is dual-licensed with zlib or Unlicense, check LICENSE.txt for more info
*/
```

## Header Structure
```c
#ifndef CF_NAME_H
#define CF_NAME_H

#include "cute_defines.h"
// ... other includes with quotes for CF headers, angle brackets for system/SDL ...

//--------------------------------------------------------------------------------------------------
// C API

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

// ... C declarations ...

#ifdef __cplusplus
}
#endif // __cplusplus

//--------------------------------------------------------------------------------------------------
// C++ API

#ifdef __cplusplus
namespace Cute {
// ... C++ wrappers ...
} // namespace Cute
#endif // __cplusplus

#endif // CF_NAME_H
```

## Naming Conventions
- Public C functions: `cf_` prefix, snake_case → `cf_make_sprite`, `cf_draw_line`
- Public C structs/enums/typedefs: `CF_` prefix → `CF_Sprite`, `CF_PIXEL_FORMAT_R8`
- X-macro enum patterns: `CF_<NAME>_DEFS` macro + `CF_<NAME>` enum typedef
- Static internal functions: `s_` prefix — never in public headers
- C++ namespace: `namespace Cute`, functions snake_case without `cf_` prefix

## Lifecycle Functions
Prefer `cf_make_<name>(...)` for creation and `cf_destroy_<name>(...)` for destruction.
Avoid other lifecycle verbs unless strongly motivated.

## Deprecation Pattern
Old name stays as the real implementation; new name is a `CF_INLINE` forwarder (or vice versa).
The deprecated symbol's doc comment must include `@deprecated Use cf_new_name instead.`
```c
/**
* @function cf_old_function
* @category example
* @brief Does the thing.
* @deprecated Use cf_new_function instead.
* @related cf_new_function
*/
CF_INLINE void cf_old_function(int x) { cf_new_function(x); }
```

## Documentation Format

All public declarations use `/** ... */` block comments with ` * ` on every interior line.
**Never use `///` style comments for documentation.**

### Tag ordering (follow this sequence)
1. `@function` / `@struct` / `@enum` — declaration kind; value is the symbol name
2. `@category` — groups symbol in docs (e.g. `graphics`, `audio`, `input`, `allocator`, `sprite`)
3. `@brief` — one-line summary
4. `@param` — one entry per parameter (omit if none)
5. `@return` — return value description (omit for `void`)
6. `@remarks` — extended notes, caveats, usage details (optional)
7. `@example` — code example with `>` title (optional)
8. `@related` — space-separated list of related symbols (highly recommended)

### Function / typedef / macro
```c
/**
* @function cf_noise2
* @category noise
* @brief Generates a random value given a 2D coordinate.
* @param noise The noise settings.
* @param x Noise at this x-component.
* @param y Noise at this y-component.
* @return Returns a random value at the specified point.
* @remarks You're probably looking for image generation functions such as `cf_noise_pixels` or
* `cf_noise_fbm_pixels`. This function is fairly low-level.
* @related CF_Noise cf_make_noise cf_destroy_noise cf_noise2 cf_noise3 cf_noise4
*/
CF_API float CF_CALL cf_noise2(CF_Noise noise, float x, float y);
```

### Struct — with `// @end` marker and `/* @member */` inline comments
```c
/**
* @struct CF_Result
* @category utility
* @brief Information about the result of a function, containing any potential error details.
* @remarks Check if a result is an error or not with `cf_is_error`.
* @related CF_Result cf_is_error cf_result_make cf_result_error cf_result_success
*/
typedef struct CF_Result
{
/* @member Either 0 for success, or -1 for failure. */
int code;

/* @member String containing details about any error encountered. */
const char* details;
} CF_Result;
// @end
```

### Enum — X-macro pattern with `/* @entry */` and `/* @end */`
```c
/**
* @enum CF_PlayDirection
* @category sprite
* @brief The direction a sprite plays frames.
* @related CF_PlayDirection cf_play_direction_to_string CF_Animation
*/
#define CF_PLAY_DIRECTION_DEFS \
/* @entry Flips through the frames of an animation forwards. */ \
CF_ENUM(PLAY_DIRECTION_FORWARDS, 0) \
/* @entry Flips through the frames of an animation backwards. */ \
CF_ENUM(PLAY_DIRECTION_BACKWARDS, 1) \
/* @end */

typedef enum CF_PlayDirection
{
#define CF_ENUM(K, V) CF_##K = V,
CF_PLAY_DIRECTION_DEFS
#undef CF_ENUM
} CF_PlayDirection;
```

### @example — indented code, title after `>`
```c
* @example > Creating a dynamic array and freeing it afterwards.
* dyna int* a = NULL;
* apush(a, 5);
* afree(a);
```
Code lines are indented to align under the title text (no triple-backtick fences in `@example`).

### @remarks — embedded code uses fenced blocks
When `@remarks` contains a multi-line code snippet, use fenced ` ```c ` blocks:
```c
* @remarks The members are stored tightly as an array. To access them:
*
* ```c
* for (int i = 0; i < info.num_uniforms; ++i) {
* printf("%s\n", info.uniforms[i].block_name);
* }
* ```
```

### Formatting rules
- **@param alignment**: pad the parameter name so all descriptions align in a column
- **@remarks continuation**: indent continuation lines to align with the first word of the description
- **@related**: single space-separated line; include both the type (`CF_Foo`) and related functions
- **Inline code**: backticks around all symbol names in prose: `` `cf_make_noise` ``, `` `CF_Noise` ``
- **Links**: standard Markdown `[text](url)` for external docs
- **"Default X" / "Out parameter"**: suffix in `@param` descriptions where applicable

## Includes
- CF headers: quotes → `#include "cute_defines.h"`
- System/SDL headers: angle brackets → `#include <SDL3/SDL.h>`
- `cute_defines.h` is almost always needed (provides `CF_INLINE`, `CF_API`, `CF_GLOBAL`, etc.)

## New Header Checklist
- [ ] Copyright header (exact format)
- [ ] Include guard `CF_<NAME>_H`
- [ ] `#include "cute_defines.h"` at minimum
- [ ] `extern "C" { ... }` wrapping for C section
- [ ] All public C functions: `cf_` prefix
- [ ] All public types: `CF_` prefix
- [ ] `/** ... */` Doxygen comments on all public declarations with `@function`/`@struct`/`@enum`, `@category`, `@brief`, and `@related` tags
- [ ] `namespace Cute` C++ wrappers section
- [ ] Added to `include/cute.h` umbrella include (follow that file's existing include ordering conventions)
- [ ] Source file `cute_<name>.cpp` added to top-level `CMakeLists.txt` (in the `CF_SRCS` list)
11 changes: 11 additions & 0 deletions .github/actions/setup-cmake/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Setup CMake
description: Install CMake 4.2.x and Ninja (latest) via lukka/get-cmake

runs:
using: composite
steps:
- name: Setup CMake 4.2.x
uses: lukka/get-cmake@latest
with:
cmakeVersion: 4.2.3
ninjaVersion: latest
Loading
Loading