Skip to content

Releases: UniquePython/kitra

Release list

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 19 May 08:35

This release is a major overhaul. The library has been renamed from Cinder to Kitra, the API has been significantly expanded, and several internal concerns have been restructured for clarity.


Breaking Changes

The library has been renamed from Cinder to Kitra. All types, functions, macros, and constants have been renamed accordingly. CinderLoadTexture is now KitraLoadTexture, CINDER_STATUS_OK is now KITRA_STATUS_OK, and so on. The header is now <kitra/kitra.h>. This affects every line of code using the library.

The kitra_blend module has been dissolved. KitraBlendMode now lives in kitra_types.h, KitraSetBlendMode has moved to kitra_draw.h, and KitraSetTextureBlendMode has moved to kitra_texture.h. Any code including kitra_blend.h directly will need updating.

KitraDrawTextureEx has a new signature. It now takes angle, pivot, and flip parameters in addition to src and dst. Existing call sites need to add 0.0f, NULL, 0 for the new parameters to preserve previous behaviour.


New Features

Surfaces (kitra_surface.h): a new module for CPU-side pixel buffers. Surfaces can be created blank or loaded from file, read and written pixel by pixel, and converted to a GPU texture. The full API: KitraCreateSurface, KitraLoadSurface, KitraDestroySurface, KitraSurfaceToTexture, KitraReadPixel/P, KitraWritePixel/P, KitraGetSurfaceSize, KitraSurfaceGetSDL.

Texture rotation, flip, tint, and alpha: KitraDrawTextureEx now supports clockwise rotation by angle in degrees, an optional pivot point, and SDL flip flags. KitraSetTextureTint and KitraSetTextureAlpha allow per-texture compositing control.

Window icon: KitraSetWindowIcon in kitra_window.h sets the window icon from a KitraSurface. SDL copies the data internally so the surface can be freed immediately after.

Screenshot to surface: KitraScreenshotSurface in kitra_texture.h captures the current render target into a KitraSurface rather than writing directly to disk, enabling in-memory post-processing before saving.

Dialogs (kitra_dialog.h): a new module for native message boxes. KitraShowMessageBox shows a simple dismiss dialog; KitraShowDialog shows a custom multi-button dialog and returns the ID of the clicked button.

Audio additions: four new functions. KitraStopSound halts a specific playing sound, KitraPlaySoundVolume plays at a temporary volume without permanently modifying the sound, KitraIsMusicPaused returns whether music is currently paused, and KitraSetMasterSoundVolume sets volume globally across all active channels.

Collision SDFs: the old boolean overlap functions (KitraRectsOverlap, KitraPointInCircle, etc.) have been replaced with signed distance functions that return a float: negative when overlapping, zero when touching, positive when separated. The full set covers all unique pairs of KitraPoint, KitraRect, KitraCircle, and KitraEllipse. Ellipse pairs use a harmonic mean approximation.

Timer additions: KitraTimerPause, KitraTimerResume, KitraGetTimerRemaining, and KitraGetTargetFPS are new. The KitraTimer struct gains pausedAt and paused fields.

Window additions: KitraSetWindowTitle, KitraGetWindowPos, and KitraSetWindowSize are new in kitra_window.h.

RNG additions: KitraRandSeed and KitraRandSeedAuto are now part of the global convenience API.


Infrastructure

CI now runs on both Linux and macOS. The release workflow builds and packages on both platforms, producing separate tarballs with SHA-256 checksums. Docs are auto-deployed to GitHub Pages via a dedicated workflow. GitHub issue templates and a pull request template have been added. CONTRIBUTING.md and SECURITY.md are new. EXTRACT_STATIC = YES has been added to the Doxyfile so static inline functions in headers appear in the generated docs.


Internal

The old kitra_blend.c has been deleted and its logic distributed into kitra_draw.c and kitra_texture.c. An internal KitraTextureFromSDL constructor has been added to allow kitra_surface.c to create textures without accessing KitraTexture internals directly. Forward declarations between kitra_surface.h and kitra_texture.h replace cross-includes to avoid a circular dependency. macOS is now handled correctly in CMake with a conditional -Wl,--allow-shlib-undefined flag.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 09 May 15:23
Release v0.1.0