Compare commits

...
This repository has been archived on 2022-12-14. You can view files and clone it, but cannot push or open issues or pull requests.

26 commits

Author SHA1 Message Date
Ralusama19
bf5ef39233 stuff 2017-01-22 17:00:37 +01:00
Ralusama19
25a38c6b08 notes mod fixed 2017-01-22 16:53:46 +01:00
Ralusama19
f096594e0e Merge branch 'master' of github.com:ralucado/WaveGGJ17 2017-01-22 15:41:13 +01:00
Ralusama19
e6ce69e20a added zip file 2017-01-22 15:41:03 +01:00
marti.lloveras
6e89ff96f5 image Guai 2017-01-22 15:25:32 +01:00
marti.lloveras
0f71a52a50 Merge branch 'master' of github.com:ralucado/WaveGGJ17 2017-01-22 15:04:18 +01:00
marti.lloveras
3f00905906 memes 2017-01-22 15:04:13 +01:00
Ralusama19
c762484669 update note mods 2017-01-22 15:04:03 +01:00
Ralusama19
41ef88d6cb Merge branch 'master' of github.com:ralucado/WaveGGJ17 2017-01-22 14:57:50 +01:00
Ralusama19
81f7b08d61 note mods 2017-01-22 14:57:45 +01:00
serk
1023691e2d perfect => +1 score 2017-01-22 14:31:57 +01:00
serk
446d07a8a2 Merge branch 'master' of https://github.com/ralucado/WaveGGJ17 2017-01-22 14:02:38 +01:00
serk
71c249426b hour fix 2017-01-22 14:02:23 +01:00
Ralusama19
51be693444 new mastered sounds 2017-01-22 05:26:59 +01:00
Ralusama19
aff857b33c portada cropped fix 2017-01-22 05:16:33 +01:00
Ralusama19
736124743a portada cropped 2017-01-22 05:14:03 +01:00
Ralusama19
cefaf2f00c Merge branch 'master' of github.com:ralucado/WaveGGJ17 2017-01-22 05:09:48 +01:00
Ralusama19
e0fa95a460 portada resize 2017-01-22 05:09:44 +01:00
serk
0a589d6a11 Merge branch 'master' of https://github.com/ralucado/WaveGGJ17 2017-01-22 05:08:12 +01:00
serk
5e8d22d51e time diversifasdasdsad 2017-01-22 05:03:56 +01:00
Ralusama19
fa3d3bd90c Merge branch 'master' of github.com:ralucado/WaveGGJ17 2017-01-22 04:57:01 +01:00
Ralusama19
b7a972c232 portada 2017-01-22 04:56:53 +01:00
marti.lloveras
aa513cbcc2 Marge error = 0.25 2017-01-22 04:41:01 +01:00
Ralusama19
469b40f6f6 removed mp3 and wavs 2017-01-22 04:28:45 +01:00
Ralusama19
f5f0ae945a sons de trrring 2017-01-22 04:26:07 +01:00
marti.lloveras
e6234333a6 aligned wave 2017-01-22 03:01:10 +01:00
100 changed files with 163 additions and 68 deletions

BIN
Radio Wave.zip Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 KiB

BIN
Resources/Sounds/Bona/1.ogg Normal file

Binary file not shown.

BIN
Resources/Sounds/Bona/2.ogg Normal file

Binary file not shown.

BIN
Resources/Sounds/Bona/3.ogg Normal file

Binary file not shown.

BIN
Resources/Sounds/Bona/4.ogg Normal file

Binary file not shown.

BIN
Resources/Sounds/Bona/5.ogg Normal file

Binary file not shown.

BIN
Resources/Sounds/Bona/6.ogg Normal file

Binary file not shown.

BIN
Resources/Sounds/Bona/7.ogg Normal file

Binary file not shown.

BIN
Resources/Sounds/Bona/8.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Resources/Sounds/clicks.ogg Normal file

Binary file not shown.

Binary file not shown.

BIN
Resources/Sounds/intro.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
Resources/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

BIN
Resources/portada.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 KiB

BIN
Resources/portada.xcf Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -1,5 +1,6 @@
uniform vec2 resolution;
uniform float time;
uniform float hour;
float rand(vec2 n) {
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
@ -36,8 +37,10 @@ void main(void) {
if (uv.y < umuv.y) uv.y += abs(time * 0.1);
else uv.y -= abs(time * 0.1);
vec4 color = vec4(255, 120, 153, 255) / 255.;
vec4 colorB = vec4(255,255,255,255)/ 255.;
vec3 colorPink = vec3(255.,0.,255.);
vec3 colorBlue = vec3(0.,255.,255.);
vec4 color = vec4(((colorBlue.x*hour) + (colorPink.x*(1.-hour)))/2.,
((colorBlue.y*hour) + (colorPink.y*(1.-hour)))/2.,
((colorBlue.z*hour) + (colorPink.z*(1.-hour)))/2., 255) / 255.;
gl_FragColor = (grid(fract(uv))) * color - line(umuv.y, 0., 0.175, 0.025) * color * 2.;
}

View file

@ -35,8 +35,8 @@ bool Actor::update(float deltaTime, sf::RenderWindow *window) {
bool Actor::hitBy(Compas enemy) {
bool dodge = enemy == compas;
if (dodge) std::cout << "dodge" << std::endl;
else std::cout << "hit" << std::endl;
/*if (dodge) //std::cout << "dodge" << std::endl;
else //std::cout << "hit" << std::endl;*/
if (!dodge) {
character->setState(PlayerState::hurt);
animate = PlayerState::inMidle;

View file

@ -25,7 +25,7 @@ int Button::getClicks(){
int c = _clicks;
//cout << "popping clicks " << c << endl;
_clicks = 0;
//if (_clicks > 0) std::cout << "popclicks = " << _clicks << std::endl;
//if (_clicks > 0) //std::cout << "popclicks = " << _clicks << std::endl;
return c;
}
@ -51,14 +51,14 @@ void Button::handleMouseEvent(sf::Event& event){
switch (event.type){
case (sf::Event::MouseButtonPressed):
if(_state == ButtonState::active) _state = ButtonState::pressed;
//std::cout << "pressed!" << _clicks << std::endl;
////std::cout << "pressed!" << _clicks << std::endl;
break;
case (sf::Event::MouseButtonReleased):
if(_state == ButtonState::pressed){
_state = ButtonState::active;
++_clicks;
//std::cout << "released!" << _clicks << std::endl;
////std::cout << "released!" << _clicks << std::endl;
}
break;

View file

@ -51,23 +51,30 @@ void Character::setState(PlayerState::playerState state){
indexX = 0;
indexY = 1 + magicNumber;
std::string sample = "atk"+std::to_string(rand()%20+1);
SoundManager::setVolume(100,sample);
SoundManager::playSound(sample);
//std::cout << "playing sample " << sample << std::endl;
////std::cout << "playing sample " << sample << std::endl;
}
else if (state == PlayerState::hurt){
std::cout << "i am hurt" << std::endl;
////std::cout << "i am hurt" << std::endl;
indexX = 0;
indexY = 2 + magicNumber;
std::string sample = "fail"+std::to_string(rand()%6+1);
SoundManager::setVolume(100,sample);
SoundManager::playSound(sample);
//std::cout << "playing sample " << sample << std::endl;
////std::cout << "playing sample " << sample << std::endl;
}
else if (state == PlayerState::success){
std::cout << "i am succeed!" << std::endl;
////std::cout << "i am succeed!" << std::endl;
indexX = 0;
indexY = 3 + magicNumber;
//std::string sample = "succeed"+std::to_string(rand()%6+1);
//SoundManager::playSound(sample);
std::string sample = "bona"+std::to_string(rand()%8+1);
SoundManager::setVolume(10,sample);
SoundManager::playSound(sample);
//std::cout << "playing sample " << sample << std::endl;
}
}

View file

@ -61,13 +61,25 @@ void Combat::updateHalo() {
}
float isNight() {
time_t rawtime;
struct tm * ptm;
time ( &rawtime );
ptm = gmtime ( &rawtime );
float hour = (float ((ptm->tm_hour+UTC)%24))/(23.);
float result = (std::cos(hour*(2*PI)) + 1.f)/2.;
return result;
}
void Combat::initShader() {
time = 0;
aux = 0;
_text.create(W_WIDTH, W_HEIGHT);
_background.setTexture(_text);
_shader.loadFromFile(WORK_DIR+"Resources/shader.frag", sf::Shader::Fragment);
_shader.setParameter("resolution", sf::Vector2f(W_WIDTH, W_HEIGHT));
_shader.setParameter("time", time);
_shader.setParameter("hour", isNight());
ASSERT(_haloT.loadFromFile(WORK_DIR+"Resources/platform-halo.png"));
_halo.setTexture(_haloT);
@ -162,6 +174,9 @@ void Combat::enemyManager(bool compasFinish) { //To do: considerar si hay ia
if(!player->hitBy(compas)) {
scoreEnemy->incrisScore();
}
else {
scorePlayer->incrisScore();
}
state = CombatState::player_atk;
break;
case CombatState::player_atk:
@ -176,6 +191,9 @@ void Combat::enemyManager(bool compasFinish) { //To do: considerar si hay ia
if(!enemy->hitBy(compas)) {
scorePlayer->incrisScore();
}
else {
scoreEnemy->incrisScore();
}
state = CombatState::enemy_atk;
break;
case CombatState::enemy_atk:
@ -192,7 +210,7 @@ void Combat::enemyManager(bool compasFinish) { //To do: considerar si hay ia
}
void Combat::doMahWaves(bool p) {
std::cout << "defensa jugador " << p << std::endl;
//std::cout << "defensa jugador " << p << std::endl;
std::vector<int> notes;
if(p){
notes = player->getAttack().getNotes();
@ -203,11 +221,11 @@ void Combat::doMahWaves(bool p) {
if(!p) anterior = 256+256*anterior;
else anterior = 768-256*anterior;
for(int i = 0; i < notes.size(); ++i){
std::cout << notes[i] << std::endl;
//std::cout << notes[i] << std::endl;
Wave* w = new Wave(p);
//if(!p) w->setPosition(anterior,500);
//else w->setPosition(512-512*anterior,500);
w->setPosition(anterior,W_HEIGHT/2);
w->setPosition(anterior,W_HEIGHT/2 + 17);
if(i<notes.size()) {
if(!p) anterior += 176*notes[i+1];
else anterior -= 176*notes[i+1];
@ -219,7 +237,7 @@ void Combat::doMahWaves(bool p) {
// if(!p) anterior = 512+256*anterior;
// else anterior = 512-256*anterior;
// for(int i = 0; i < 20; ++i){
// //std::cout << 0 << std::endl;
// ////std::cout << 0 << std::endl;
// Wave* w = new Wave(p);
// //if(!p) w->setPosition(anterior,500);
// //else w->setPosition(512-512*anterior,500);

View file

@ -10,6 +10,11 @@
#include "soundmanager.hpp"
#include "score.hpp"
#include "wave.hpp"
#include <time.h>
#define PI 3.14159265
class Combat : public Scene {
public:
@ -40,6 +45,7 @@ class Combat : public Scene {
bool isPlayerOne() const;
void updateHalo();
void doMahWaves(bool p);
int aux;
};

View file

@ -13,9 +13,11 @@
#include <string>
#include "soundmanager.hpp"
const int SCENE_NUM = 4;
#define MARGEERR 0.2f
#define MARGEERR 0.25f
#define BLACKVALUE 0.4f
#define W_WIDTH 1024
#define UTC (0)
#define W_HEIGHT 768
const std::string WORK_DIR(getenv("WORK_DIR"));

View file

@ -9,7 +9,7 @@ Compas::Compas() {
void Compas::start() {
failed = false;
if (not isPress) {
// std::cout << "start" << std::endl;
// //std::cout << "start" << std::endl;
isPress = true;
spaceTime = 1;
notes = std::vector<int>();
@ -20,16 +20,16 @@ void Compas::add() {
if (isPress) {
notes.push_back(spaceTime);
spaceTime = 1;
// std::cout << "add" << std::endl;
// //std::cout << "add" << std::endl;
}
}
void Compas::end() {
if (isPress) {
isPress = false;
// std::cout << "end" << std::endl;
// //std::cout << "end" << std::endl;
// for (int i = 0; i < notes.size(); ++i) {
// std::cout << notes[i] << std::endl;
// //std::cout << notes[i] << std::endl;
// }
}
}

View file

@ -20,15 +20,17 @@ Game* Game::i() {
// Main game loop
void Game::run() {
sf::Clock c;
sf::RenderWindow window(sf::VideoMode(W_WIDTH, W_HEIGHT), "( ( ( Radio Waves ) ) )", sf::Style::Close);
sf::RenderWindow window(sf::VideoMode(W_WIDTH, W_HEIGHT), "( ( ( Radio Wave ) ) )", sf::Style::Close);
window.setFramerateLimit(25);
window.setKeyRepeatEnabled(false);
float oldTime = c.getElapsedTime().asSeconds();
while (isRunning) {
float time = c.getElapsedTime().asSeconds();
float deltaTime = time-oldTime;
oldTime = time;
//std::cout << deltaTime << std::endl;
////std::cout << deltaTime << std::endl;
update(deltaTime, &window);
draw( &window);
}

View file

@ -17,7 +17,7 @@ Menu::Menu() {
void Menu::update(float deltaTime, sf::RenderWindow*window){
//float dx = InputManager::action(InputAction::moveX0);
//_buttons[0]->move(dx,0);
//std::cout << dx << std::endl;
////std::cout << dx << std::endl;
for(unsigned int i = 0; i < _buttons.size(); ++i){
_buttons[i]->update(window->mapPixelToCoords(sf::Vector2i(sf::Mouse::getPosition(*window))));
}
@ -31,14 +31,14 @@ void Menu::draw(sf::RenderWindow* window){
}
void Menu::updateEvents(sf::Event e){
// std::cout << "update menu buttons" << std::endl;
// //std::cout << "update menu buttons" << std::endl;
for(unsigned int i = 0; i < _buttons.size(); ++i){
_buttons[i]->handleMouseEvent(e);
}
MyGame* g = static_cast<MyGame*>(Game::i());
if (_start.getClicks() > 0){
g->changeScene(GameScene::inGame);
std::cout << "Game not ready to be played. Please Wait." << std::endl;
//std::cout << "Game not ready to be played. Please Wait." << std::endl;
}
else if(_exit.getClicks() > 0) g->isRunning = false;

View file

@ -8,9 +8,8 @@ MyGame::MyGame() {
_scenes[GameScene::inGame] = _combat;
_scenes[GameScene::help] = _menu;
_scenes[GameScene::credits] = _menu;
std::cout << "in menu" << std::endl;
//std::cout << "in menu" << std::endl;
SoundManager::load();
SoundManager::setGlobalSoundVolumen(50);
SoundManager::setLoop(true, "intro");
SoundManager::playMusic("intro");
}
@ -31,6 +30,7 @@ void MyGame::changeScene(GameScene::gameScene n){
_combat = new Combat;
_scenes[_scene] = _combat;
SoundManager::setLoop(true, "clicks");
SoundManager::setVolume(85,"clicks");
SoundManager::playMusic("clicks");
}
}
@ -38,7 +38,7 @@ void MyGame::changeScene(GameScene::gameScene n){
// Main game loop
void MyGame::update(float deltaTime, sf::RenderWindow*window) {
// std::cout << deltaTime << std::endl;
// //std::cout << deltaTime << std::endl;
sf::Event event;
while(window->pollEvent(event)){
switch (event.type) {
@ -56,7 +56,7 @@ void MyGame::update(float deltaTime, sf::RenderWindow*window) {
switch(_scene){
case(GameScene::menu):
//std::cout << "still in menu" << std::endl;
////std::cout << "still in menu" << std::endl;
break;
default:
break;

View file

@ -4,20 +4,26 @@ Player::Player(int num) : Actor(num) {
compas = Compas();
error = false;
time = 0;
mod = false;
}
Player::Player() : Actor() {
compas = Compas();
error = false;
time = 0;
mod = false;
}
bool Player::updateLogic(float deltaTime, sf::RenderWindow *window) {
time += deltaTime;
clock += deltaTime;
if (time > BLACKVALUE) {
compas.incraeseTime();
time = 0;
}
if (clock >= 89.15) clock = 0.0;
if (!mod && clock > 38.10 && clock < 64) mod = true;
else if (mod && clock < 38.10 || clock > 64) mod = false;
return false;
}
@ -25,9 +31,11 @@ bool Player::event(sf::Event e) {
switch(e.type) {
case (sf::Event::KeyPressed):
if(e.key.code == sf::Keyboard::C) {
std::string sample = "note"+std::to_string(rand()%4+1);
std::string sample = "mod"+std::to_string(rand()%4+1);
if(!mod) sample = "note"+std::to_string(rand()%4+1);
SoundManager::playSound(sample);
std::cout << "playing sample " << sample << std::endl;
//std::cout << "playing sample " << sample << std::endl;
compas.start();
error = false;
}

View file

@ -11,10 +11,11 @@ public:
bool event(sf::Event e) final override;
protected:
bool updateLogic(float deltaTime, sf::RenderWindow *window);
private:
float time;
bool error;
bool mod;
float clock = 0.0;
};
#endif // PLAYER_H

View file

@ -39,6 +39,18 @@ sf::SoundBuffer SoundManager::note1;
sf::SoundBuffer SoundManager::note2;
sf::SoundBuffer SoundManager::note3;
sf::SoundBuffer SoundManager::note4;
sf::SoundBuffer SoundManager::bona1;
sf::SoundBuffer SoundManager::bona2;
sf::SoundBuffer SoundManager::bona3;
sf::SoundBuffer SoundManager::bona4;
sf::SoundBuffer SoundManager::bona5;
sf::SoundBuffer SoundManager::bona6;
sf::SoundBuffer SoundManager::bona7;
sf::SoundBuffer SoundManager::bona8;
sf::SoundBuffer SoundManager::mod1;
sf::SoundBuffer SoundManager::mod2;
sf::SoundBuffer SoundManager::mod3;
sf::SoundBuffer SoundManager::mod4;
std::map<std::string, sf::Sound> SoundManager::soundMap;
std::map<std::string, sf::Music> SoundManager::musicMap;
@ -50,68 +62,92 @@ void SoundManager::load(){
//LOAD HERE YOUR SOUNDS AND MUSIC
/* Example: */
musicMap["intro"].openFromFile(WORK_DIR+"Resources/Sounds/intro.wav");
musicMap["clicks"].openFromFile(WORK_DIR+"Resources/Sounds/clicks.wav");
ASSERT(atk1.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/1.wav"));
musicMap["intro"].openFromFile(WORK_DIR+"Resources/Sounds/intro.ogg");
musicMap["clicks"].openFromFile(WORK_DIR+"Resources/Sounds/clicks.ogg");
ASSERT(atk1.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/1.ogg"));
soundMap["atk1"].setBuffer(atk1);
ASSERT(atk2.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/2.wav"));
ASSERT(atk2.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/2.ogg"));
soundMap["atk2"].setBuffer(atk2);
ASSERT(atk3.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/3.wav"));
ASSERT(atk3.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/3.ogg"));
soundMap["atk3"].setBuffer(atk3);
ASSERT(atk4.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/4.wav"));
ASSERT(atk4.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/4.ogg"));
soundMap["atk4"].setBuffer(atk4);
ASSERT(atk5.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/5.wav"));
ASSERT(atk5.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/5.ogg"));
soundMap["atk5"].setBuffer(atk5);
ASSERT(atk6.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/6.wav"));
ASSERT(atk6.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/6.ogg"));
soundMap["atk6"].setBuffer(atk6);
ASSERT(atk7.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/7.wav"));
ASSERT(atk7.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/7.ogg"));
soundMap["atk7"].setBuffer(atk7);
ASSERT(atk8.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/8.wav"));
ASSERT(atk8.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/8.ogg"));
soundMap["atk8"].setBuffer(atk8);
ASSERT(atk9.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/9.wav"));
ASSERT(atk9.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/9.ogg"));
soundMap["atk9"].setBuffer(atk9);
ASSERT(atk10.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/10.wav"));
ASSERT(atk10.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/10.ogg"));
soundMap["atk10"].setBuffer(atk10);
ASSERT(atk11.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/11.wav"));
ASSERT(atk11.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/11.ogg"));
soundMap["atk11"].setBuffer(atk11);
ASSERT(atk12.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/12.wav"));
ASSERT(atk12.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/12.ogg"));
soundMap["atk12"].setBuffer(atk12);
ASSERT(atk13.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/13.wav"));
ASSERT(atk13.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/13.ogg"));
soundMap["atk13"].setBuffer(atk13);
ASSERT(atk14.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/14.wav"));
ASSERT(atk14.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/14.ogg"));
soundMap["atk14"].setBuffer(atk14);
ASSERT(atk15.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/15.wav"));
ASSERT(atk15.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/15.ogg"));
soundMap["atk15"].setBuffer(atk15);
ASSERT(atk16.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/16.wav"));
ASSERT(atk16.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/16.ogg"));
soundMap["atk16"].setBuffer(atk16);
ASSERT(atk17.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/17.wav"));
ASSERT(atk17.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/17.ogg"));
soundMap["atk17"].setBuffer(atk17);
ASSERT(atk18.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/18.wav"));
ASSERT(atk18.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/18.ogg"));
soundMap["atk18"].setBuffer(atk18);
ASSERT(atk19.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/19.wav"));
ASSERT(atk19.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/19.ogg"));
soundMap["atk19"].setBuffer(atk19);
ASSERT(atk20.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/20.wav"));
ASSERT(atk20.loadFromFile(WORK_DIR+"Resources/Sounds/Samples/20.ogg"));
soundMap["atk20"].setBuffer(atk20);
ASSERT(fail1.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/1.wav"));
ASSERT(fail1.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/1.ogg"));
soundMap["fail1"].setBuffer(fail1);
ASSERT(fail2.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/2.wav"));
ASSERT(fail2.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/2.ogg"));
soundMap["fail2"].setBuffer(fail2);
ASSERT(fail3.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/3.wav"));
ASSERT(fail3.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/3.ogg"));
soundMap["fail3"].setBuffer(fail3);
ASSERT(fail4.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/4.wav"));
ASSERT(fail4.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/4.ogg"));
soundMap["fail4"].setBuffer(fail4);
ASSERT(fail5.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/5.wav"));
ASSERT(fail5.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/5.ogg"));
soundMap["fail5"].setBuffer(fail5);
ASSERT(fail6.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/6.wav"));
ASSERT(fail6.loadFromFile(WORK_DIR+"Resources/Sounds/Fails/6.ogg"));
soundMap["fail6"].setBuffer(fail6);
ASSERT(note1.loadFromFile(WORK_DIR+"Resources/Sounds/Notes/1.wav"));
ASSERT(note1.loadFromFile(WORK_DIR+"Resources/Sounds/Notes/1.ogg"));
soundMap["note1"].setBuffer(note1);
ASSERT(note2.loadFromFile(WORK_DIR+"Resources/Sounds/Notes/2.wav"));
ASSERT(note2.loadFromFile(WORK_DIR+"Resources/Sounds/Notes/2.ogg"));
soundMap["note2"].setBuffer(note2);
ASSERT(note3.loadFromFile(WORK_DIR+"Resources/Sounds/Notes/3.wav"));
ASSERT(note3.loadFromFile(WORK_DIR+"Resources/Sounds/Notes/3.ogg"));
soundMap["note3"].setBuffer(note3);
ASSERT(note4.loadFromFile(WORK_DIR+"Resources/Sounds/Notes/4.wav"));
ASSERT(note4.loadFromFile(WORK_DIR+"Resources/Sounds/Notes/4.ogg"));
soundMap["note4"].setBuffer(note4);
ASSERT(bona1.loadFromFile(WORK_DIR+"Resources/Sounds/Bona/1.ogg"));
soundMap["bona1"].setBuffer(bona1);
ASSERT(bona2.loadFromFile(WORK_DIR+"Resources/Sounds/Bona/2.ogg"));
soundMap["bona2"].setBuffer(bona2);
ASSERT(bona3.loadFromFile(WORK_DIR+"Resources/Sounds/Bona/3.ogg"));
soundMap["bona3"].setBuffer(bona3);
ASSERT(bona4.loadFromFile(WORK_DIR+"Resources/Sounds/Bona/4.ogg"));
soundMap["bona4"].setBuffer(bona4);
ASSERT(bona5.loadFromFile(WORK_DIR+"Resources/Sounds/Bona/5.ogg"));
soundMap["bona5"].setBuffer(bona5);
ASSERT(bona6.loadFromFile(WORK_DIR+"Resources/Sounds/Bona/6.ogg"));
soundMap["bona6"].setBuffer(bona6);
ASSERT(bona7.loadFromFile(WORK_DIR+"Resources/Sounds/Bona/7.ogg"));
soundMap["bona7"].setBuffer(bona7);
ASSERT(bona8.loadFromFile(WORK_DIR+"Resources/Sounds/Bona/8.ogg"));
soundMap["bona8"].setBuffer(bona8);
ASSERT(mod1.loadFromFile(WORK_DIR+"Resources/Sounds/NotesMod/1.ogg"));
soundMap["mod1"].setBuffer(mod1);
ASSERT(mod2.loadFromFile(WORK_DIR+"Resources/Sounds/NotesMod/2.ogg"));
soundMap["mod2"].setBuffer(mod2);
ASSERT(mod3.loadFromFile(WORK_DIR+"Resources/Sounds/NotesMod/3.ogg"));
soundMap["mod3"].setBuffer(mod3);
ASSERT(mod4.loadFromFile(WORK_DIR+"Resources/Sounds/NotesMod/4.ogg"));
soundMap["mod4"].setBuffer(mod4);
}

View file

@ -59,6 +59,18 @@ class SoundManager {
static sf::SoundBuffer note2;
static sf::SoundBuffer note3;
static sf::SoundBuffer note4;
static sf::SoundBuffer bona1;
static sf::SoundBuffer bona2;
static sf::SoundBuffer bona3;
static sf::SoundBuffer bona4;
static sf::SoundBuffer bona5;
static sf::SoundBuffer bona6;
static sf::SoundBuffer bona7;
static sf::SoundBuffer bona8;
static sf::SoundBuffer mod1;
static sf::SoundBuffer mod2;
static sf::SoundBuffer mod3;
static sf::SoundBuffer mod4;

View file

@ -11,7 +11,7 @@ Wave::Wave(bool dir){
direction = dir;
ASSERT(texture.loadFromFile(spriteFile));
setTexture(texture);
setOrigin(texture.getSize().x/2,texture.getSize().y/2);
setOrigin(texture.getSize().x/2,texture.getSize().y - 1);
// sf::IntRect rect = sf::IntRect(0, 0, texture.getSize().x, texture.getSize().y);
// setTextureRect(rect);
}