Gered
07f2b13f68
this is an unfortunately large commit. probably should've been broken up into multiple smaller ones. i decided to revert some earlier preparatory work i had done to organize graphics functionality into two main streams: "indexed" and "rgb". this was going to result in two completely different Bitmap structs which were going to be largely similar and as i thought about it more, i realized my earlier thinking that i wouldn't be able to generify the Bitmap struct based on pixel-depth was actually not correct. so, this commit re-works things significantly in a way which i think is better but probably still not perfect. basically, we have one Bitmap struct which provides a lot of generic functionality, but also specialized implementations based on pixel-depth and this is now what is separated out into graphics::bitmap::indexed and graphics::bitmap::rgb. but the rest of the graphics functionality is not separated out by module like this any longer. note that i've still kept the GeneralBitmap trait and implementations. i was originally thinking i could get rid of this since i'd now made Bitmap generic over pixel-depth, but doing so would require me to rename the common/general blit methods to avoid a name collision with the specialized implementations (since they would both exist on the same types now). and i did not like that. i dunno, maybe i will change my mind later. |
||
---|---|---|
.. | ||
assets | ||
src | ||
Cargo.toml | ||
README.md |
ggdt - Audio Playback Example
Simple example of playing back one or more sounds loaded from WAV files simultaneously.
Run cargo run
from this directory to try it out.