Files
soundThing/include/config.h
Anachronaut 75e0894ff8 v0.9.5 beta — full feature build ready for distribution
Core additions since initial commit:
- Platform-split MIDI (midi_linux.c / midi_windows.c)
- Patch system: save/load/scan, subdirectory navigation, favourites
- Config system: last MIDI device and CC mappings persisted to disk
- Custom embedded pixel font and sprite sheet (no loose asset files at runtime)
- Window icon embedded at runtime (SetWindowIcon) and in Windows .exe (windres)
- chdirToExeDir() in platform.c so double-click launch finds patches/ correctly
- About screen accessible from Master panel

UI polish:
- TITLE_BAR_H constant (20 px) — sprite buttons now fit inside title bars
- All title bar text, button overlay text, and close/active labels vertically centred
- Full-screen dim overlay computed from camera transform (no more partial coverage)
- Patch browser: folder navigation, breadcrumb title, 256-slot limit lifted

Build:
- Makefile auto-discovers sources; embeds sprites/font/icon via xxd rules
- Windows cross-compile: make PLATFORM=windows (mingw-w64 + windres)
- windows.h isolated in platform.c to avoid Rectangle/CloseWindow conflicts with raylib.h
- WIN_RES uses lazy = assignment so OBJ_DIR expands correctly for windres output path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 19:18:34 -04:00

21 lines
545 B
C

#ifndef CONFIG_H
#define CONFIG_H
#define CONFIG_DIR "config"
#define CONFIG_NAME_LEN 128
typedef struct {
int cc;
int controlId;
float min;
float max;
} ConfigCcEntry;
void configSanitizeName(const char *in, char *out, int maxLen);
int configSaveLastDevice(const char *deviceName);
int configLoadLastDevice(char *out, int maxLen);
int configSaveCcMappings(const char *deviceName, ConfigCcEntry *entries, int count);
int configLoadCcMappings(const char *deviceName, ConfigCcEntry *entries, int maxCount);
#endif