https://github.com/RobLoach/raylib-assetsys
Use the file system abstraction library, assetsys.h, to load raylib assets from .zip files.
https://github.com/RobLoach/raylib-assetsys
raylib
Last synced: 23 days ago
JSON representation
Use the file system abstraction library, assetsys.h, to load raylib assets from .zip files.
- Host: GitHub
- URL: https://github.com/RobLoach/raylib-assetsys
- Owner: RobLoach
- License: zlib
- Created: 2023-09-10T20:06:20.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-10T20:24:14.000Z (over 1 year ago)
- Last Synced: 2024-04-20T06:31:33.689Z (about 1 year ago)
- Topics: raylib
- Language: C
- Homepage:
- Size: 182 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-raylib - raylib-assetsys
README
# raylib-assetsys
Use the file system abstraction library, [assetsys.h](https://github.com/mattiasgustavsson/libs/blob/main/assetsys.h), with [raylib](https://github.com/raysan5/raylib), to allow loading assets from .zip files.
## Example
``` c
#include#define RAYLIB_ASSETSYS_IMPLEMENTATION
#include "raylib-assetsys.h"int main(int argc, char* argv[]) {
// Initialize assetsys, and mount resources.zip as /data
InitAssetsys("resources.zip", "/data");// Load cat.png from the zip
Image cat = LoadImageFromAssetsys("/data/cat.png");
UnloadImage(cat);// Close the assetsys
CloseAssetsys();return 0;
}
```## API
``` c
bool InitAssetsys(char const* path, char const* mount_as);
bool MountAssetsys(const char* path, const char* mount_as);
bool IsAssetsysReady();
void CloseAssetsys();
unsigned char *LoadFileDataFromAssetsys(const char *fileName, int *dataSize);
char *LoadFileTextFromAssetsys(const char *fileName);
Image LoadImageFromAssetsys(const char* fileName);
```## License
*raylib-assetsys* is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.