aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-12-09 08:21:08 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-12-09 08:21:08 -0500
commit996a2b90c40b078dabc9a435156a836b9693d0b1 (patch)
tree1e3b102a29893244114ffad85ffdb2f8be082db3
parentd2aa39603eb8a26142a0230188d2572fb0398af5 (diff)
Did Shit
-rw-r--r--assets/sounds/cricket.wavbin0 -> 8695476 bytes
-rw-r--r--assets/sounds/longSwing.mp3bin0 -> 7941 bytes
-rw-r--r--assets/sounds/longSwing.wavbin0 -> 85376 bytes
-rw-r--r--assets/sounds/shortSwing.wavbin0 -> 100196 bytes
-rw-r--r--main.cpp7
-rw-r--r--src/gameplay.cpp2
-rw-r--r--src/inventory.cpp8
-rw-r--r--src/ui.cpp3
8 files changed, 15 insertions, 5 deletions
diff --git a/assets/sounds/cricket.wav b/assets/sounds/cricket.wav
new file mode 100644
index 0000000..70be7e5
--- /dev/null
+++ b/assets/sounds/cricket.wav
Binary files differ
diff --git a/assets/sounds/longSwing.mp3 b/assets/sounds/longSwing.mp3
new file mode 100644
index 0000000..cb6dced
--- /dev/null
+++ b/assets/sounds/longSwing.mp3
Binary files differ
diff --git a/assets/sounds/longSwing.wav b/assets/sounds/longSwing.wav
new file mode 100644
index 0000000..e9b60f2
--- /dev/null
+++ b/assets/sounds/longSwing.wav
Binary files differ
diff --git a/assets/sounds/shortSwing.wav b/assets/sounds/shortSwing.wav
new file mode 100644
index 0000000..bd42737
--- /dev/null
+++ b/assets/sounds/shortSwing.wav
Binary files differ
diff --git a/main.cpp b/main.cpp
index d1fd85e..e02677d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -116,6 +116,8 @@ unsigned int deltaTime = 0;
GLuint fragShader;
GLuint shaderProgram;
+Mix_Chunk *crickets;
+
/*
* names is used to open a file containing all possible NPC names. It is externally
* referenced in src/entities.cpp for getting random names.
@@ -401,6 +403,9 @@ int main(/*int argc, char *argv[]*/){
*/
names = fopen("assets/names_en-us", "r+");
+
+ crickets=Mix_LoadWAV("assets/sounds/crickets.wav");
+ Mix_Volume(3,25);
/*
* Create all the worlds, entities, mobs, and the player. This function is defined in
@@ -950,8 +955,10 @@ void logic(){
if(!(tickCount%DAY_CYCLE)||!tickCount){
if(weather==SUNNY){
weather=DARK;
+ Mix_PlayChannel(3,crickets,0);
}else{
weather=SUNNY;
+ Mix_Pause(3);
}
}
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index f665b38..9eacf2a 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -64,7 +64,7 @@ void story(Mob *callee){
ui::waitForDialog();
ui::importantText("times.");
ui::waitForDialog();
- ui::importantText("Clyne is quite satisfied.");
+ ui::importantText("Clyne is a faggot.");
ui::waitForDialog();
callee->alive = false;
}
diff --git a/src/inventory.cpp b/src/inventory.cpp
index c1595e8..8d8f958 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -10,6 +10,7 @@ static float hangle = 0.0f;
static bool up = true;
static float xc,yc;
static vec2 itemLoc;
+Mix_Chunk* swordSwing;
static const Item item[ITEM_COUNT]= {
#include "../config/items.h"
@@ -23,6 +24,9 @@ void initInventorySprites(void){
for(i = 0;i < ITEM_COUNT;i++){
itemtex[i] = Texture::loadTexture(getItemTexturePath((ITEM_ID)i));
}
+
+ swordSwing = Mix_LoadWAV("assets/sounds/shortSwing.wav");
+ Mix_Volume(2,75);
}
char *getItemTexturePath(ITEM_ID id){
@@ -311,11 +315,11 @@ int Inventory::useItem(void){
switch(type){
case SWORD:
if(!player->left){
- if(hangle==-15)up=true;
+ if(hangle==-15){up=true;Mix_PlayChannel(2,swordSwing,0);}
if(up)hangle-=15;
if(hangle<=-90)hangle=-14;
}else{
- if(hangle==15)up=true;
+ if(hangle==15){up=true;Mix_PlayChannel(2,swordSwing,0);}
if(up)hangle+=15;
if(hangle>=90)hangle=14;
}
diff --git a/src/ui.cpp b/src/ui.cpp
index f843e7d..b0ed64c 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -525,8 +525,7 @@ namespace ui {
Mix_PlayChannel(1,dialogClick,0);
}
- }else if(!dialogImportant){
-
+ }else if(!dialogImportant && !fadeIntensity){
vec2 hub = {
(SCREEN_WIDTH/2+offset.x)-fontSize*10,
(offset.y+SCREEN_HEIGHT/2)-fontSize