Skip to content

Commit

Permalink
fixed null0_load_sfx in web-host
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumer committed Sep 8, 2024
1 parent 7c99f9b commit c0a5f54
Show file tree
Hide file tree
Showing 14 changed files with 1,033 additions and 636 deletions.
6 changes: 3 additions & 3 deletions cart/c/sound/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ int main() {
preloaded_sfx = new_sfx(&preloaded);

// load a SFX from a file
SfxParams* fileloaded = malloc(96);
load_sfx(fileloaded, "assets/sound.rfx");
fileloaded_sfx = new_sfx(fileloaded);
SfxParams fileloaded = {};
load_sfx(&fileloaded, "assets/sound.rfx");
fileloaded_sfx = new_sfx(&fileloaded);

return 0;
}
Expand Down
Binary file modified docs/cart/colorbars.null0
Binary file not shown.
Binary file modified docs/cart/draw.null0
Binary file not shown.
Binary file modified docs/cart/filesystem.null0
Binary file not shown.
Binary file modified docs/cart/flappybird.null0
Binary file not shown.
Binary file modified docs/cart/hello.null0
Binary file not shown.
Binary file modified docs/cart/input.null0
Binary file not shown.
Binary file modified docs/cart/justlog.null0
Binary file not shown.
Binary file modified docs/cart/sound.null0
Binary file not shown.
Binary file modified docs/cart/tracker.null0
Binary file not shown.
Binary file modified docs/cart/typesizes.null0
Binary file not shown.
60 changes: 30 additions & 30 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
<html>
<head>
<title>Null0</title>
<head>
<title>Null0</title>

<style>
body {
margin: auto;
margin-top: 20px;
width: 1024px;
background: black;
color: white;
font-family: sans-serif;
}
null0-cart {
margin: 10px;
}
</style>
<style>
body {
margin: auto;
margin-top: 20px;
width: 1024px;
background: black;
color: white;
font-family: sans-serif;
}
null0-cart {
margin: 10px;
}
</style>

<!-- here is how to do it without the web-component
<!-- here is how to do it without the web-component
<script type="module">
import { setupCart } from 'https://notnullgames.github.io/null0/null0.js'
const cart = await setupCart('cart/input.null0')
</script>
-->

<script type="module" src="./null0_wc.js"></script>
</head>
<body>
<p>Here are some example carts:</p>
<script type="module" src="./null0_wc.js"></script>
</head>
<body>
<p>Here are some example carts:</p>

<null0-cart src="cart/input.null0" fps></null0-cart>
<null0-cart src="cart/colorbars.null0" fps></null0-cart>
<null0-cart src="cart/draw.null0" fps></null0-cart>
<!-- <null0-cart src="cart/hello.null0" fps></null0-cart> -->
<!-- <null0-cart src="cart/flappybird.null0" fps></null0-cart> -->
<null0-cart src="cart/sound.null0" fps></null0-cart>
<!-- <null0-cart src="cart/typesizes.null0" fps></null0-cart> -->
<!-- <null0-cart src="cart/filesystem.null0"></null0-cart> -->
<!-- <null0-cart src="cart/justlog.null0"></null0-cart> -->
</body>
<null0-cart src="cart/input.null0" fps></null0-cart>
<null0-cart src="cart/colorbars.null0" fps></null0-cart>
<null0-cart src="cart/draw.null0" fps></null0-cart>
<!-- <null0-cart src="cart/hello.null0" fps></null0-cart> -->
<!-- <null0-cart src="cart/flappybird.null0" fps></null0-cart> -->
<null0-cart src="cart/sound.null0" fps></null0-cart>
<!-- <null0-cart src="cart/typesizes.null0" fps></null0-cart> -->
<!-- <null0-cart src="cart/filesystem.null0"></null0-cart> -->
<!-- <null0-cart src="cart/justlog.null0"></null0-cart> -->
</body>
</html>
Loading

0 comments on commit c0a5f54

Please sign in to comment.