Commit Graph

3 Commits

Author SHA1 Message Date
Peterino2 fbc49f1596 3 hours of vibe coding or just having a real programmer step in for 20 minutes... 2026-01-22 21:19:21 -08:00
Peterino2 0c548e053a fix: handle hex flag values with 'u' suffix and array parameters
- Strip 'u'/'U' suffix from hex literals before parsing bit positions
- Fixed array parameter syntax (argv[]) -> converted to pointer-to-pointer
- Added type conversion for char ** and char**
- SDL_init.h now parses successfully (15/16 headers working)

Still unsupported:
- SDL_iostream.h: function pointer fields in structs (complex C syntax)
2026-01-22 18:25:58 -08:00
Peterino2 724b5e1a05 feat: add JSON export and regenerate multiple SDL headers
- Implemented --generate-json flag to export parsed API as JSON
- Added proper JSON formatting using std.json
- Fixed memory leaks in JSON generation
- Updated build.zig to generate 15 different SDL headers
- Successfully parsing 13/15 headers (init and iostream have issues)

Working headers:
- SDL_gpu, SDL_video, SDL_events, SDL_keyboard
- SDL_mouse, SDL_scancode, SDL_keycode, SDL_pixels
- SDL_rect, SDL_surface, SDL_blendmode, SDL_timer
- SDL_error

Known issues:
- SDL_init.h: array syntax in function pointer params (argv[])
- SDL_iostream.h: function pointer fields in structs not supported
2026-01-22 18:16:49 -08:00