Skip to content

not-jan/rgrit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rgrit - Rust bindings for grit

Crates.io Version docs.rs Crates.io License

This crate provides a Rust interface to grit - the GBA Image Transmogrifier (“grit” for short). It is a bitmap conversion tool for GBA/NDS development.

The bindings are generated using bindgen.

The manual for grit can be found here.

Building

git clone https://github.com/not-jan/rgrit.git
cd rgrit
git submodule update --init
cargo build

Requirements

MacOS

brew install automake libtool freeimage llvm

I'm not sure if llvm is required, but it's probably a good idea to install it anyway.

Linux (Ubuntu / Debian)

sudo apt-get install autoconf build-essential libtool libfreeimage-dev

Windows

Untested, but might work.

Usage

use rgrit::StaticBitmap;

const BACKGROUND: StaticBitmap = rgrit::grit! {
    "assets/test.png",
    transparency = Disabled,
    bit_depth = 16,
    format = Bitmap,
};

fn main() {
    dbg!(&BACKGROUND);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors