Jump to content
Tuts 4 You

uFMOD & C++ (Visual)


mynes

Recommended Posts

Posted

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..... :)

Posted

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

Posted

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.

Posted

Arr..well that does explain it :P

  • 1 year later...
Posted (edited)

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 ;)

Edited by Tomay
Posted

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

  • 2 years later...
Posted (edited)

[solved]

Edited by Mike.X.
Posted

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

  • 4 months later...
Posted

anyone can explain to do with codeblocks??

Posted

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

  • Like 1
Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...