Guigui220D / zig-sfml-wrapper

A zig wrapper for csfml
Other
52 stars 9 forks source link

Modules separation #12

Closed Guigui220D closed 3 years ago

Guigui220D commented 3 years ago

Breaking changes

Modules (window, system, graphics, audio) are now separated. You can still use them as one this way :

const sf = struct {
    pub usingnamespace @import("sfml");
    pub usingnamespace graphics;
    pub usingnamespace window;
    pub usingnamespace system;
    pub usingnamespace audio;
};

Functions that create an object are now called create instead of init, as the csfml does, and their destructor destroy. Object created with init don't need to be destroyed.