From a85e6c544912b9ebd261b5da29b26e3232284173 Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Mon, 11 Apr 2005 12:10:36 +0000 Subject: - First step toward syncing attack animation with attack speed - Added a nice sample when attacking to stress test sound engine/ loading samples through resource manager. --- src/game.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index fdd8899e..30eb5f29 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -224,12 +224,8 @@ void do_input() } else if ((keysym.sym == SDLK_F7)) { - /*SOUND_SID id = sound.loadItem("data/sfx/fist-swish.ogg"); - sound.startItem(id, 120);*/ - ResourceManager *resman = ResourceManager::getInstance(); - SoundEffect *sample = resman->getSoundEffect( - "sfx/fist-swish.ogg"); - sample->play(0, 120); + SOUND_SID id = sound.loadItem("data/sfx/fist-swish.ogg"); + sound.startItem(id, 120); } // Emotions, Skill dialog @@ -365,7 +361,7 @@ void do_input() } else { // Search for player character to trade with - /* + id = find_pc(mx, my); if (id != 0) { // Begin a trade @@ -373,7 +369,6 @@ void do_input() WFIFOL(2) = net_l_value(id); WFIFOSET(6); } - */ } @@ -537,6 +532,11 @@ void do_input() player_node->y, player_node->direction); player_node->walk_time = tick_time; + + ResourceManager *resman = ResourceManager::getInstance(); + SoundEffect *sample = resman->getSoundEffect( + "sfx/fist-swish.ogg"); + sample->play(0, 120); } } @@ -1017,6 +1017,9 @@ void do_parse() { sprintf(points, "b0 0x0009 %i", RFIFOL(4)); chatWindow->chat_log(points, BY_SERVER);*/ break; + case 0x0035: + player_node->aspd = RFIFOW(4); + break; default: /*char unknown[20]; sprintf(unknown, "b0 %x %i", RFIFOW(2),RFIFOL(4)); -- cgit v1.2.3-60-g2f50