aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2021-03-14 17:30:19 +0000
committerrodri <rgl@antares-labs.eu>2021-03-14 17:30:19 +0000
commit4385429eb868a82a5efcc7692c49f445c272f361 (patch)
tree20ac21f238b2bea3b5b991cf40d0f9bd5e33f9e5
parenta9f1b278e96482963ab47361adef51ed4db6e2d7 (diff)
downloadgamephysics-4385429eb868a82a5efcc7692c49f445c272f361.tar.gz
gamephysics-4385429eb868a82a5efcc7692c49f445c272f361.tar.bz2
gamephysics-4385429eb868a82a5efcc7692c49f445c272f361.zip
add birds sound and Ness sprite sheet.
-rw-r--r--assets/sheets/ness.picbin0 -> 70192 bytes
-rw-r--r--assets/sounds/birds.wavbin0 -> 2705096 bytes
-rw-r--r--main.c4
3 files changed, 4 insertions, 0 deletions
diff --git a/assets/sheets/ness.pic b/assets/sheets/ness.pic
new file mode 100644
index 0000000..4adf53d
--- /dev/null
+++ b/assets/sheets/ness.pic
Binary files differ
diff --git a/assets/sounds/birds.wav b/assets/sounds/birds.wav
new file mode 100644
index 0000000..f857755
--- /dev/null
+++ b/assets/sounds/birds.wav
Binary files differ
diff --git a/main.c b/main.c
index c36096a..8a4fad3 100644
--- a/main.c
+++ b/main.c
@@ -15,6 +15,7 @@ GameState state;
double t, Δt;
Sprite *ghoul, *ghoulbig;
+Sprite *ness;
Point
@@ -82,6 +83,7 @@ redraw(void)
ghoul->draw(ghoul, screen, toscreen(Pt2(100,-100,1)));
ghoulbig->draw(ghoulbig, screen, toscreen(Pt2(-100,-100,1)));
+ ness->draw(ness, screen, toscreen(Pt2(-160,-120,1)));
flushimage(display, 1);
unlockdisplay(display);
@@ -207,6 +209,7 @@ threadmain(int argc, char *argv[])
ghoul = readsprite("assets/sheets/NpcCemet.pic", Pt(48,0), Rect(0,0,16,16), 5, 150);
ghoulbig = newsprite(ghoul->sheet, Pt(144,64), Rect(0,0,24,24), 5, 120);
+ ness = readsprite("assets/sheets/ness.pic", Pt(0,9), Rect(0,0,16,24), 20, 150);
bgsound = cm_new_source_from_file("assets/sounds/birds.wav");
if(bgsound == nil)
@@ -266,6 +269,7 @@ threadmain(int argc, char *argv[])
ghoul->step(ghoul, frametime/1e6);
ghoulbig->step(ghoulbig, frametime/1e6);
+ ness->step(ness, frametime/1e6);
redraw();