Skip to content

Docs: sync README API block with raylib-physfs.h #59

Description

@RobLoach

Summary

The API block in README.md (lines ~52–78) has drifted from the actual declarations in raylib-physfs.h:

  1. LoadImageAnimFromPhysFS() is missing — added in Add LoadImageAnimFromPhysFS #36 (commit 8570c06) and declared at raylib-physfs.h:71, but absent from the README API list (the Features bullet list doesn't mention animated images either).
  2. Stale write signatures — README shows SaveFileDataToPhysFS(const char* fileName, void* data, int bytesToWrite) and SaveFileTextToPhysFS(const char* fileName, char* text), but the header now uses RAYLIB_PHYSFS_SAVE_DATA_CONST void* data (const on raylib 6.1+, see raylib-physfs.h:40–47) and const char* text.
  3. MountPhysFSFromMemory() buffer lifetime undocumentedPHYSFS_mountMemory() is called with a NULL destructor (raylib-physfs.h:274), so PhysFS does not copy the archive data: the caller's buffer must remain valid until it is unmounted or ClosePhysFS() runs. Neither the README nor the function's doc comment says this.

Suggested Implementation

  • Regenerate the README API block from the current header declarations (drop the RAYLIB_PHYSFS_DEF prefix for readability, note the const-qualification difference briefly or just show the raylib 6.1+ signature).
  • Add LoadImageAnimFromPhysFS to the API block and mention animated image support in Features.
  • Add a lifetime note to both the README and the MountPhysFSFromMemory() doc comment: "the fileData buffer is not copied and must remain valid until unmounted".

QA

  • Every declaration in the #ifndef INCLUDE_RAYLIB_PHYSFS_H_ block of raylib-physfs.h appears in the README API list with a matching signature, and nothing extra appears.
  • README renders correctly on GitHub.

Context

  • Docs-only; no code changes, no dependencies on other issues filed today (though if new API like LoadSoundFromPhysFS lands first, include it in the regenerated block).
  • From a planning pass on 2026-07-20.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions