Skip to content

Releases: zetanumbers/wasm4-rs

wasm4-impl v0.1.1

17 Jan 11:38
Compare
Choose a tag to compare

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

view details
  • Uncategorized

wasm4-common v0.1.2

17 Jan 11:37
Compare
Choose a tag to compare

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

view details
  • Uncategorized

wasm4 v0.1.0

14 Jan 04:26
Compare
Choose a tag to compare

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 💀:

hey there kiddo

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

wasm4-impl v0.1.0

14 Jan 04:21
Compare
Choose a tag to compare

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

view details

wasm4-common v0.1.1

14 Jan 04:20
Compare
Choose a tag to compare

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

view details

wasm4 v0.0.3

02 Jan 14:01
Compare
Choose a tag to compare

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 for sound::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

02 Jan 13:40
Compare
Choose a tag to compare

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)