3 Commits

Author SHA1 Message Date
Ville Lindholm
869056c5d2
Phase 0: profiling scaffolding for DOD refactor
Adds a tiny zone-based profiler (prof.{h,cpp}) enabled via KOBO_PROF=1.
Instruments run_game with zones for myship.move, enemies.move (split into
realize and move_pass), hit_structure, and hit_bolt. Adds KOBO_STRESS=N
to keep the enemy pool topped up with rocks for stable per-frame timing.

Why: the entity/render pipeline refactor in BENCH.md needs a comparable
baseline before any layout changes. Without a stress workload the natural
gameplay enemy count is too noisy to compare across commits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-29 13:31:31 +03:00
Ville Lindholm
9b0662865e
WIP: switch build to SDL 3 (does not compile yet)
This is the first commit of the SDL 1.2 -> SDL 3 migration. It lands
the build-system change and the include-path rewrites; the code does
NOT compile against SDL 3 yet, by design. Stays on this branch until
the migration is finished.

- CMakeLists.txt: find_package(SDL3 CONFIG) + SDL3::SDL3 /
  SDL3_image::SDL3_image. Drops the legacy FindSDL machinery.
- glSDL.h, sprite.c, glSDL.c, filters.c, gfxengine.cpp, audio.c:
  rewrite #include "SDL*.h" -> <SDL3/...> / <SDL3_image/...>.

Known wall: graphics/glSDL.{c,h} collides with SDL 3's surface API
renames (SDL_FreeSurface, SDL_FillRect, SDL_SetColorKey,
SDL_SetClipRect, SDL_bool). The next phase deletes the entire glSDL
shim and rewrites graphics/ against SDL_Renderer / SDL_Texture.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-28 21:23:08 +03:00
Ville Lindholm
9eaf27b297
Migrate build system from autotools to CMake
Replace configure.in + 7 Makefile.am files with a CMake build:
- Top-level CMakeLists.txt with feature detection (SDL 1.2,
  SDL_image, OpenGL, optional OSS/ALSA), platform-specific install
  layouts (macOS .app bundle, Windows simple bundle, Unix), and a
  shared kobo_deps INTERFACE target for flags and link libraries.
- Sub-CMakeLists for graphics/, sound/, eel/ static libraries.
- aconfig.h.cmake.in and Info.plist.cmake.in templates (minimal:
  only the HAVE_* macros actually referenced by the code).

Remove all autotools machinery: configure, configure.in, aclocal.m4,
Makefile.am files, generated Makefile.in files, install-sh, missing,
depcomp, compile, mkinstalldirs, config.guess, config.sub, the
buildpkg.sh Solaris helper, and the cfg-* configure shortcuts.

Update .gitignore for CMake out-of-tree builds, and point
run-kobodl.sh at build/kobodl (overridable via KOBODL_BIN).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-28 21:08:58 +03:00