Alright, I'll have to explain a few things here to try to answer your questions, I'll try to keep it to the short version, and if I cover something you already know, I apologize:
OK, first off, the Windows installer I linked to does a number of things, it does more than just un-pack the codec all by itself - It includes filters - both Directshow
1 and Video-For-Windows
2 that plug in to nearly any video editing software easily, which allow for both
encoding as well as
decoding Xvid video files. It also sets up components so that Windows Media Player will easily play back Xvid videos - Right after running the installer, one could double-click on an AVI file encoded with Xvid and it would play, no extra mess or fuss. As such, with these components it includes the xvidcore.dll, the xvid.ax file, and another dll file called xvidvfw.dll. (I'm guessing the last one, xvidvfw.dll, is for the Windows-For-Video interface.) The installer also includes a few other utilities for working with Xvid video files, little utilities which show up under the program menu from the Windows "start" button.
The goal we're trying to get to though - coding part of a C application (the UFO:AI game) to simply use the proper DLL files to internally support cinematic playback with its own internal player - is a little different though and doesn't require all of those components that the Xvid installer sets up.
xvidcore.dll I'm sure will certainly be needed, I'm not sure if xvidvfw.dll would also be necessary as xvidvfw.dll is probably for the Windows-specific Video-For-Windows interface which I don't
think UFO:AI would need to access - I don't know the details of how the internal video player in the game works, but if I had to guess I'd say "no."
As for the xvid.ax file, if I have my information straight I believe that has to do with allowing Windows Media Player to automatically find the codec as well as Video Editing software (such as Vegas, Premiere, Video Studio, etc.). I'm
guessing we would
not need that file.
Including the entire Xvid installer IMO is a bad idea, the same goes for integrating it with the game installer. Doing so would mean installing codec components that would affect operation of other software on Windows - which is bad because it would not be self-contained to just the game - and also because the end-user may already have a different version of Xvid already on their system from a codec package, an Xvid installer, or some other software. (This would mean it could mess up Windows Media Player and video editing apps for the end-user). Needless to say, if the full Xvid installer was put into the game we would get lots of nasty feedback from gamers who tried the game and complained about how it messed up their video editing apps or playback of video on their system.
In light of these points, I'd say include just the xvidcore.dll, at least for now, and add other things as needed.
You also asked:
...do you think that this dll is enough to encode xvid files?
If you want to "encode" or
create Xvid files as well as play them back in-game, that's a little bit different. If you want to get into that, for example, to record game sessions and demos, I'd suggest looking into adding a library called REVEL, which I think stands for Really Easy Video Encoding Library. REVEL is a free, open-source (it's also on sourceforge) C/C++ library that works with Xvid for creating video files in a C or C++ application. I glanced at the API and docs once, the only issue is that it isn't fully up-to-date to work with the latest version of Xvid. I've heard from people who have tried REVEL that if you can get it to work its kind of cool for recording game sessions and demos, so you don't have to use separate screen recording software.
1 Directshow is one type of interface for video playback on Windows, it is what standard Windows Media Player and some video editing software apps (both commercial and free ones) use.
2 Video For Windows is an older interface for video playback on Windows, going back to Windows 98 SE, but still used by many modern video editing apps, such as VirtualDub, as well as some commercial ones.
Edit: Is SDL used for Video in the game? I know its used for audio...
P.S. Perhaps we should split this thread and continue this discussion in the "Coding" section, under "Adding OGM Support" or some other appropriate title, as this goes off-topic from an introduction animation and is getting technical.