reset velo -> set + fix png2c wrap
This commit is contained in:
parent
f04ba84834
commit
0f7109cb11
4
app.c
4
app.c
|
@ -52,9 +52,9 @@ void key_released(int key)
|
|||
|
||||
v2 velocity = {0, 0};
|
||||
|
||||
void reset_velocity(void)
|
||||
void set_velocity(float x, float y)
|
||||
{
|
||||
velocity = (v2){0, 0};
|
||||
velocity = (v2){x, y};
|
||||
}
|
||||
|
||||
void rebondi(v2 *pos, int scale)
|
||||
|
|
2
build.sh
2
build.sh
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
export_sym="init go key_pressed key_released reset_velocity BUFFER width height"
|
||||
export_sym="init go key_pressed key_released set_velocity BUFFER width height"
|
||||
export_cmd=""
|
||||
for e in $export_sym; do
|
||||
export_cmd="$export_cmd -Wl,--export=$e";
|
||||
|
|
2
load.js
2
load.js
|
@ -17,7 +17,7 @@ window.onload = () => {
|
|||
scale_p.innerText = "scale: " + scale;
|
||||
}
|
||||
reset_but.onclick = () => {
|
||||
global_instance.exports.reset_velocity();
|
||||
global_instance.exports.set_velocity(0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
BIN
penger.png
BIN
penger.png
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 4.6 KiB |
Loading…
Reference in New Issue