From dcf47fba9123c4a957f8270bd1f5a797483ca339 Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Fri, 14 Jul 2006 17:01:26 +0000 Subject: [PATCH] 'hop' sound SVN-Revision: 4004 --- data/sounds/hop.ogg | Bin 0 -> 5781 bytes src/badguy/skullyhop.cpp | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 data/sounds/hop.ogg diff --git a/data/sounds/hop.ogg b/data/sounds/hop.ogg new file mode 100644 index 0000000000000000000000000000000000000000..6350c3313f1904b257a984507dda90573369ba8b GIT binary patch literal 5781 zcmai130PCfvOWCr>ncFtLm>hbq@ObJ3(up zug#(4n2KnsRVg0=Q-?(zXVL@0MGG*?a?u}XCt>2hde}kH$-kTEq=+)2;pUCf|MI_D zhr}wQjezbJaN^jugG_&1Z~)y!%pOO^85$Uv7#JBCi@3qou5QMgTe!d=1Xv;3;rKEA zDKrQ|LC_H`yj+?e8PDV7>7LHy*obC)gTzcuA|K@g=q(N&zBUicQ5GH^qa5KuNkD+5l38nD(^{ooeA$H z&E|X^kYYV>;4bD;s=g?5gou3tz9^FkSgopsgJOW1(EcmRGyY}pouZ41+~qH47<_26O)w?n|Erc^yX(|CWlaa;Ia(Dz4J zc5v)^-rC9k-u~}jOTTC9pLS|JG*pQGnh2!>f-}I2=xYN0%%GpEr6P>el8cH*>#U2dqRecV8 ziSNwf=VtYD!+XgxT;A&Jv|={AqI3|fsm|ue2~>}QeF1}9c^D4iuuqZv8(|e!v6r4zWlpWN7^a8VwzB#XYkfODJhmR@n+tD$M;OYfjG+T=)7BWPDVm%Xp;^f+yYvGk7n;>4T&|@o)L#5z(s}Tj9it|k|lTsB2 zNqi==6JHFX;#qo#`aDsUIQwTLuiK64zD2-#t@A$62%y=V|d<)cCY&yFsorRIU4y*`e6`v!nPBdpec>i`I9Ns+M? z=MhJ${s`4%gsM+--uIs)22e+g?T3tkVbdW<6@oScC$mtOm?`F=``i%38LhQ>B&ocI z7*;XLNQNY<8IfY9v#&mt)GG7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d00001 diff --git a/src/badguy/skullyhop.cpp b/src/badguy/skullyhop.cpp index 302ac9aea..63e6435de 100644 --- a/src/badguy/skullyhop.cpp +++ b/src/badguy/skullyhop.cpp @@ -27,16 +27,19 @@ namespace { const float HORIZONTAL_SPEED = 220; /**< x-speed when jumping */ const float MIN_RECOVER_TIME = 0.1; /**< minimum time to stand still before starting a (new) jump */ const float MAX_RECOVER_TIME = 1.0; /**< maximum time to stand still before starting a (new) jump */ + static const std::string HOP_SOUND = "sounds/hop.ogg"; } SkullyHop::SkullyHop(const lisp::Lisp& reader) : BadGuy(reader, "images/creatures/skullyhop/skullyhop.sprite") { + sound_manager->preload( HOP_SOUND ); } SkullyHop::SkullyHop(const Vector& pos, Direction d) : BadGuy(pos, d, "images/creatures/skullyhop/skullyhop.sprite") { + sound_manager->preload( HOP_SOUND ); } void @@ -74,6 +77,7 @@ SkullyHop::set_state(SkullyHopState newState) sprite->set_action(dir == LEFT ? "jumping-left" : "jumping-right"); physic.set_velocity_x(dir == LEFT ? -HORIZONTAL_SPEED : HORIZONTAL_SPEED); physic.set_velocity_y(VERTICAL_SPEED); + sound_manager->play( HOP_SOUND, get_pos()); } state = newState; -- 2.11.0