Skip to content

Conversation

soxfox42
Copy link
Contributor

@soxfox42 soxfox42 commented Jul 2, 2022

As mentioned in #1784 (comment), I found a few problems with the current Zig template.

With this PR, there is no longer an example of using the raw API, as I couldn't come up with a suitable structure that supported multiple examples without duplicating tic80.zig. I don't think this is a major issue though, as I imagine most users of the WASM templates will use the wrappers anyway.

Copy link
Owner

@nesbox nesbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@nesbox nesbox merged commit 42746f0 into nesbox:main Jul 2, 2022
@@ -269,7 +269,7 @@ pub const trib = raw.trib;

const TextriArgs = struct {
texture_source : TextureSource = TextureSource.TILES,
transparent: []const u8 = .{},
transparent: []const u8 = &.{},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit strange, what version of Zig were you using again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the latest master, since 0.9.1 is missing the export_table field on LibExeObjStep.

Without the &, it seems to be an array literal (type omitted), which can't be coerced to a slice. The pointer to the array can be coerced though. (Zig Documentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants