Code Monkey home page Code Monkey logo

gfx3's Introduction

GFX3

GFX3 is a Sprite Stacking library for the CE C Toolchain. GFX3 allows you to effortlessly manage stacked sprites without the haste of over-coding.

Getting Started

GFX3 is designed to make it easy to create and manipulate stacked sprites in your application. With the library, you can stack multiple sprites on top of each other, adjust their position, scale, and rotation, and even make them transparent. This can help you create more complex and dynamic graphics in your application, without having to manually manipulate each sprite individually.

How to use GFX3

  • Copy the /gfx3 folder into your project's /src directory.
  • In your project's main.c file, include the GFX3 header file:
    • #include "gfx3/gfx3.h"
    • This will allow you to use GFX3 functions in your code.
  • To create a stacked sprite, start by defining a gfx3_object_t struct:
    • Replace the layers array with your own array of gfx_sprite_t* pointers. You can add as many layers as you need to create the desired effect.
      • NOTE: Rendering will take longer the more sprites there are per layer.
gfx_sprite_t *layers[/*size + 1*/] = {/* Sprites */, NULL}; // make sure to include NULL at the end of the array
struct gfx3_object_t my_object;
gfx3_SetObjectSprites(my_object, layers);
  • To render the sprite to the screen, use the gfx3_Object function:
    • gfx3_Object(&my_object, x, y);
    • Replace x and y with the desired screen coordinates to position the sprite.

For more detailed examples and tutorials, see the /examples directory in the GFX3 repository.

Features

  • Easy to use API for creating and manipulating stacked sprites.

  • Support for stacking multiple sprites on top of each other, with adjustable z-ordering.

  • Ability to adjust the position, scale, and rotation of individual sprites.

  • Transparency support for individual sprites, allowing for more complex graphics.

  • Simple syntax for rendering stacked sprites to the screen.

Demos

Keep up to date on the recent development by checking out the Discord Server or Cemetech Forums.


Copyright © 2020 - 2023, Alvajoy Asante

gfx3's People

Contributors

overload02 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.