Jump to content
Tuts 4 You

Archived

This topic is now archived and is closed to further replies.

mynes

uFMOD & C++ (Visual)

Recommended Posts

Angel-55

It does work but as i said Console mode doesn't need the declearation of (hInstance) which he used in source ;)

anyway he got it working lately..... :)

Share this post


Link to post
Share on other sites
mynes

Dam.. i didn't see all these posts, i meant to reply, yeah i got it working with the help of killboy, however for some strange reason when creating the RC file and adding the XM name it didn't work. i had to edit the RC file in notepad and add the XM name in there and it works, now if i edit the name inside of VS 2005 its works aswell its pretty strange :P

Share this post


Link to post
Share on other sites
atom0s

Visual Studio doesn't keep up to date with your resource file edits. So you usually have to do a full rebuild for it to pickup any changes.

Share this post


Link to post
Share on other sites
mynes

Arr..well that does explain it :P

Share this post


Link to post
Share on other sites
Tomay

Solved in Visual C++ 6.0 :

1 - Download ufmod.rar uploaded by Killboy.

2 - Copy ufmod.h , ufmod.lib and winmm.lib to the project directory

3 - Add #include <windows.h> , #include <mmsystem.h> and #include "ufmod.h" to the main .cpp file.

4 - In the main menu of Visual C++ 6.0, select : Project -> Settings... (Alt+F7). In the Link tab, in the Object/library modules: edit control, Copy/Paste this : ufmod.lib winmm.lib.

5 - Import your XM resource file and set its type to : 10.

6 - Rename the new XM resource to 1.

7 - Add this code : uFMOD_PlaySong((char*)1, 0, XM_RESOURCE); where you want to start playing song

8 - Enjoy ;)

Share this post


Link to post
Share on other sites
Guest codrgi

Isn't that just a workaround though? it's not solving the problem at hand.

Share this post


Link to post
Share on other sites
X-88

Pascal is Better, he... (3x)... easy, simple, small, and difficult infectected with the virus from Indonesia. lol :)

Share this post


Link to post
Share on other sites
deurus

anyone can explain to do with codeblocks??

Share this post


Link to post
Share on other sites
T-rad

anyone can explain to do with codeblocks??

same. but for step 4 use:

Project -> Build Options -> Linker settings. under Link libraries: add ufmod.lib winmm.lib

if using GCC compiler do not use ".lib" for winmm

Share this post


Link to post
Share on other sites
Departure

Just to clear things up between the difficulty with Delphi vs C++, As most Delphi coders know you can create window gui apps just like C++ using nearly the exact same code(win32) except for the syntax. The only reason people seem to think Delphi is easier is due to the sloppyness of C++ coders, C++ allows you to write sloppy as where Delphi is a lot more Defined in the way one must code. I have read many C++ sources, some look easy to read and understand while other sources complete cryptic, I am not sure of the C++ coding standards but there seems to be too wide a variation to learn the correct coding standard. Delphi how ever messy coder decides to make it is still readable by anyone who has win32 knowledge with API's ect... So I believe its upto the person and what he prefers and is comfortable with. Unfortanly for me im getting to old and have never enough time to learn the wide variations of C++ so I stick with Delphi, I can code anything C++ can do(besides drivers) without to much of an issue, after all most windows programmers use api's and that never changes between any programming language.

Share this post


Link to post
Share on other sites

×