Skip to content

RobLoach/pntr_physfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pntr_physfs

PhysicsFS support for pntr to load and save images with PhysFS.

Usage

Include pntr_physfs.h before including pntr.h. This will define PNTR_LOAD_FILE and PNTR_SAVE_FILE to have pntr load/save files with PhysicsFS.

#include "physfs.h"

#define PNTR_PHYSFS_IMPLEMENTATION
#include "pntr_physfs.h"

#define PNTR_IMPLEMENTATION
#include "pntr.h"

int main() {
    // Initialize PhysFS
    PHYSFS_init(0);
    PHYSFS_mount("resources.zip", "res", 1);

    // Load an image from the resources.zip file.
    pntr_image* image = pntr_load_image("res/hello.png");

    // Deinitialize PhysFS
    PHYSFS_deinit();
}

License

Unless stated otherwise, all works are:

... and licensed under:

About

PhysicsFS support for pntr.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published