Releases: zetanumbers/wasm4-rs
Releases · zetanumbers/wasm4-rs
wasm4-impl v0.1.1
Commit Statistics
- 2 commits contributed to the release.
- 2 commits where understood as conventional.
- 0 issues like '(#ID)' where seen in commit messages
Commit Details
wasm4-common v0.1.2
Commit Statistics
- 2 commits contributed to the release.
- 2 commits where understood as conventional.
- 0 issues like '(#ID)' where seen in commit messages
Commit Details
wasm4 v0.1.0
Framebuffer support
Now you are able to include_spire!
from any image you have! Here's a small demo:
#![no_main]
use wasm4 as w4;
struct SansRuntime {
framebuffer: w4::draw::Framebuffer,
}
// displays sans
impl w4::rt::Runtime for SansRuntime {
fn start(res: w4::rt::Resources) -> Self {
SansRuntime {
framebuffer: res.framebuffer,
}
}
fn update(&mut self) {
w4::include_sprites! {
// 0xa64902 is a background color (indexed 0)
// 0x000000 is a foreground color (indexed 1)
// every other color is added if needed
const PALETTE: _ = common_palette!(0xa64902, 0x000000);
// every image may contain at most 4 colors each (transparent included)
// all images may contain at most 4 color total (transparent excluded)
const SMILE: _ = include_sprite!("src/sans.png");
const TALK: _ = include_sprite!("src/talk.png");
};
self.framebuffer.replace_palette(PALETTE);
self.framebuffer.blit(&SMILE, [68, 32], <_>::default());
self.framebuffer.blit(&TALK, [0, 92], <_>::default());
}
}
w4::main! { SansRuntime }
And here's the result 💀:
Other framebuffer functionality also is added (oval
, text
and others).
Documentation
- embed preview image
- fix markdown headers
New Features
- add
include_sprites!
macro - add
blit
support - add
Framebuffer::as_cells
Bug Fixes
- add
bitflags
crate SpriteView
lifetime
New Features (BREAKING)
- Add basic framebuffer support
Bug Fixes (BREAKING)
- framebuffer's byte length
refactor (BREAKING)
- naming
- remove prelude
- update prelude
- privatize utils module
Framebuffer
's methods
Commit Statistics
- 20 commits contributed to the release.
- 20 commits where understood as conventional.
- 0 issues like '(#ID)' where seen in commit messages
Commit Details
view details
- Uncategorized
- add named header into a changelog (c3651cf)
- update changelogs (a0f0eb4)
- embed preview image (c55457c)
- bump versions (ac05404)
- add preview link (68aab26)
- add
include_sprites!
macro (06dc6af) - add
bitflags
crate (bc8c6cc) - naming (d2fcdeb)
SpriteView
lifetime (af5de1c)- lifetime elision (caf2814)
- add default type parameter for
Sprite
(f365438) - remove prelude (4340269)
- fix markdown headers (e2a6345)
- add
blit
support (883fd55) - update prelude (c993b2b)
- privatize utils module (f8c3bd8)
- add
Framebuffer::as_cells
(b27db46) Framebuffer
's methods (fe8a08a)- framebuffer's byte length (7aeec95)
- Add basic framebuffer support (03dd8b1)
wasm4-impl v0.1.0
New Features
- add
include_sprites!
macro
Commit Statistics
- 3 commits contributed to the release.
- 3 commits where understood as conventional.
- 0 issues like '(#ID)' where seen in commit messages
Commit Details
wasm4-common v0.1.1
New Features
- add
include_sprites!
macro
Commit Statistics
- 3 commits contributed to the release.
- 3 commits where understood as conventional.
- 0 issues like '(#ID)' where seen in commit messages
Commit Details
wasm4 v0.0.3
This is the first working release of wasm4
crate! You can add this crate
as a dependency to your cartridge's code by specifying it in Cargo.toml:
[dependencies]
wasm4 = "0.0.3" # add this line
Fully safe statefull cartridges
You can now create fully safe statefull cartridges like this:
// src/main.rs
#![no_main]
struct MyRuntime {
count: i32,
}
// prints "tick..." every second
impl wasm4::Runtime for MyRuntime {
fn start(_: wasm4::Resources) -> Self {
MyRuntime { count: 0 }
}
fn update(&mut self) {
if self.count % 60 == 0 {
wasm4::trace("tick");
self.count = 0;
}
self.count += 1;
}
}
wasm4::main! { MyRuntime }
Notice that this is not a library (src/lib.rs
), but an executable (src/main.rs
). This is done for better integration with cargo tooling, being able to run these cartriges using cargo run
.
Bug Fixes
- copy example's source into wasm4 docs
Documentation
- add changelog for
wasm4
New Features
- add runtime creation functionality
refactor (BREAKING)
- change to the new experimental api
Commit Statistics
- 14 commits contributed to the release over the course of 18 calendar days.
- 6 commits where understood as conventional.
- 0 issues like '(#ID)' where seen in commit messages
Commit Details
view details
- Uncategorized
- regenerate and adjust docs (fc71325)
- copy example's source into wasm4 docs (74390f2)
- Release wasm4-sys v0.1.0, wasm4 v0.0.3 (9a8c498)
- regenerate and adjust changelog (ceaee04)
- bump crates versions (2c68e02)
- add runtime creation functionality (7a1d011)
sound::Mode
values are bit aligned forsound::Flags
(8027ce0)- change to the new experimental api (233c4f9)
- add changelog for
wasm4
(7b490fe) - Release 0.0.2 (d7fbc7c)
- Release 0.0.1 (0090ea9)
- Prepare manifest for publish (3b31a1e)
- Fix docs a bit (cbe67e0)
- Implement sys bindings; Implement sound module (babbc6d)
wasm4-sys v0.1.0
Documentation
- clarify safety of raw bindings usage
- add changelog for
wasm4-sys
Bug Fixes (BREAKING)
- remove
libc
dependency
Commit Statistics
- 8 commits contributed to the release over the course of 18 calendar days.
- 4 commits where understood as conventional.
- 0 issues like '(#ID)' where seen in commit messages
Commit Details
view details
- Uncategorized
- regenerate and adjust changelog (ceaee04)
- bump crates versions (2c68e02)
- remove
libc
dependency (6ced143) - clarify safety of raw bindings usage (51563be)
- add changelog for
wasm4-sys
(030105e) - Release 0.0.1 (0090ea9)
- Prepare manifest for publish (3b31a1e)
- Implement sys bindings; Implement sound module (babbc6d)