-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d66dc0
commit 5dd6898
Showing
12 changed files
with
203 additions
and
5 deletions.
There are no files selected for viewing
Submodule miniaudio
updated
5 files
+0 −13 | CHANGES.md | |
+51 −70 | extras/miniaudio_split/miniaudio.c | |
+3 −4 | extras/miniaudio_split/miniaudio.h | |
+53 −73 | miniaudio.h | |
+0 −1 | tests/test_deviceio/ma_test_deviceio.c |
Submodule stb
updated
8 files
+0 −3 | .gitignore | |
+5 −7 | README.md | |
+175 −173 | stb_image.h | |
+588 −610 | stb_image_resize2.h | |
+0 −259 | tests/pngsuite/ref_results.csv | |
+0 −47 | tests/test_png_paeth.c | |
+0 −75 | tests/test_png_regress.c | |
+2 −4 | tools/README.header.md |
Submodule umka
updated
28 files
+1 −2 | README.md | |
+0 −7 | build_playground_linux.sh | |
+0 −2 | doc/lang.md | |
+1 −22 | doc/lib.md | |
+1 −1 | playground/umka.js | |
+0 −2 | run_emscripten_linux.sh | |
+0 −0 | runtime/embed_runtime_linux.sh | |
+2 −19 | runtime/std.um | |
+7 −11 | src/umka_common.c | |
+0 −4 | src/umka_compiler.c | |
+5 −5 | src/umka_decl.c | |
+3 −6 | src/umka_expr.c | |
+3 −3 | src/umka_ident.c | |
+1 −1 | src/umka_lexer.c | |
+0 −25 | src/umka_runtime.c | |
+0 −4 | src/umka_runtime.h | |
+518 −535 | src/umka_runtime_src.h | |
+7 −43 | src/umka_stmt.c | |
+3 −3 | src/umka_types.c | |
+2 −2 | src/umka_types.h | |
+0 −1 | src/umka_vm.c | |
+4 −8 | tests/all.um | |
+687 −700 | tests/expected.log | |
+0 −14 | tests/imports4.um | |
+0 −2 | tests/path with spaces/a.um | |
+0 −0 | tests/path with spaces/b.um | |
+0 −0 | tests/path with spaces/module with spaces.um | |
+0 −39 | tests/redecl.um |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
#include "tophat.h" | ||
|
||
#define MAX(a, b) (a > b ? a : b) | ||
#define MIN(a, b) (a < b ? a : b) | ||
|
||
int | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
import ( | ||
"th.um" | ||
"canvas.um" | ||
"window.um" | ||
"atlas.um" | ||
"image.um" | ||
) | ||
|
||
fn drawAtlas(a: atlas.Atlas, p: th.Vf2): th.Vf2 { | ||
a.i.draw({ p: p, s: { 1, 1 } }) | ||
idm := a.i.getDims() | ||
|
||
for i:=1; i < a.dm.x; i++ { | ||
canvas.drawLine(th.yellow, | ||
{ p.x + i*a.cs.x, p.y }, | ||
{ p.x + i*a.cs.x, p.y + idm.y }, | ||
2 | ||
) | ||
} | ||
|
||
for i:=1; i < a.dm.y; i++ { | ||
canvas.drawLine(th.yellow, | ||
{ p.x, p.y + i*a.cs.y }, | ||
{ p.x + idm.x, p.y + i*a.cs.y }, | ||
2 | ||
) | ||
} | ||
|
||
return { p.x, p.y + idm.y + 20 } | ||
} | ||
|
||
fn init*() { | ||
window.setup("Pack test", 400, 400) | ||
|
||
logos := []image.Image{ | ||
image.load("etc/logo/logo-hatonly-white.png"), | ||
image.load("etc/logo/logo-hatonly.png"), | ||
image.load("etc/logo/logo-normal-white.png"), | ||
image.load("etc/logo/logo-normal.png"), | ||
image.load("etc/logo/logo-notext-white.png"), | ||
image.load("etc/logo/logo-notext.png") | ||
} | ||
|
||
square := atlas.pack(logos, atlas.PackSquare) | ||
row := atlas.pack(logos, atlas.PackRow) | ||
column := atlas.pack(logos, atlas.PackColumn) | ||
|
||
window.onFrame.register(|square, row, column| { | ||
p := th.Vf2{ 1, 1 } | ||
p = drawAtlas(square, p) | ||
p = drawAtlas(row, p) | ||
p = drawAtlas(column, p) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters