Back to the Vavoom Forum Archives


Forum

Compiling Vavoom under Win32

Thu, 14 Jun 2007 07:31:15

Crimson Wizard

Janis, I was trying to compile Vavoom using recent sources from SVN; Firebrand provided me with all the libraries needed, but I met a couple of problems there, I don't know if this will be helpful, anyway I decided to tell you about them. Firstly, the one which confused me much, - compiler reported an error in cl_main.cpp on line 415, function CL_SetUpStandaloneClient(), where macro guard() was used, it said that there's not enough actual parameters for this macro; I looked around the code to get the idea of this macro and changed it to guard(CL_SetUpStandaloneClient), and after that it compiled fine. It was rather confusing, I may only make a guess that our compilers handle this code a bit differently. Secondly, there was an error in s_mikmod.cpp where VMikModAudioCodec::Driver is initialized. I believe that mikmod version 3.2.0 that Firebrand gave me is not properly supported by Vavoom yet, thus there's one parameter missing in MDRIVER struct initialization which caused total values mismatch. Here how beginning of MDRIVER structure looks like in mikmod 3.2.0:
CHAR*       Name;
CHAR*       Version;
UBYTE       HardVoiceLimit; /* Limit of hardware mixer voices */
UBYTE       SoftVoiceLimit; /* Limit of software mixer voices */

CHAR        *Alias;
CHAR        *CmdLineHelp;

void        (*CommandLine) (CHAR*);
BOOL        (*IsPresent) (void);

SWORD       (*SampleLoad) (struct SAMPLOAD*,int);
........
........
In your initialization a proper value for parameter (*CommandLine)(CHAR*) is missing. I tried to solve this first by adding extra NULL there, then by adding a new empty function to VMikModAudioCodec to match that "void (*CommandLine)(CHAR*)" parameter; in both cases game crash as soon as tried to create sound driver (in VMikModAudioCodec::Create()) (I am not sure that my changes were the main reason, though). So for now I have to run compiled Vavoom without sound. EDIT: now I understand it was CHAR*CmdLineHelp parameter that was not initialized properly
Thu, 14 Jun 2007 13:57:42

Firebrand

I'm not having these errors myself, are you sure you are using the correct header files from mikmod library? EDIT: I see the possible problem, I uploaded the sources of mikmod player too, maybe you got confused with both sources? Sorry, I've deleted the wrong source files from the FTP <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Thu, 14 Jun 2007 14:10:18

Crimson Wizard

The one that left there is exactly what I used. I haven't found there a mikmod.h for win32 actually, but I read installation instructions in one readme and it was said there to rename win32\mikmod_build.h to mikmod.h and use it; that's what I did. Besides all other headers for other platforms have identical MDRIVER structure.
Thu, 14 Jun 2007 14:42:43

Firebrand

Please try the old mikmod ilbraries source I uploaded, it should fix the problem <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Thu, 14 Jun 2007 14:56:08

Crimson Wizard

As I can see I was mistaken about missing parameter, it is actually CHAR *CmdLineHelp; not void (*CommandLine) (CHAR*); This may be an explanation of the app crash.

Back to the Vavoom Forum Archives