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.
*/
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
if(!(tickCount%DAY_CYCLE)||!tickCount){
if(weather==SUNNY){
weather=DARK;
+ Mix_PlayChannel(3,crickets,0);
}else{
weather=SUNNY;
+ Mix_Pause(3);
}
}
ui::waitForDialog();
ui::importantText("times.");
ui::waitForDialog();
- ui::importantText("Clyne is quite satisfied.");
+ ui::importantText("Clyne is a faggot.");
ui::waitForDialog();
callee->alive = false;
}
static bool up = true;
static float xc,yc;
static vec2 itemLoc;
+Mix_Chunk* swordSwing;
static const Item item[ITEM_COUNT]= {
#include "../config/items.h"
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){
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;
}
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