[Français]

NEWS
INTRODUCTION
TERMINOLOGY
THE SOURCE CODE
THE BUGS
TUTORIALS
DOWNLOADS
THE AUTHOR

  STUDY BY FILES: THE FILES & THEIR ROLE

Now that we've surrounded the main directories of the source code, we can take a deeper look at the files.
This section will try to list all the AvP files and their role. Again, take it as an interpretation: for sure, there may be mistakes, so be careful !

1) Why such a section ?

I know that this work's already been done in the AvP Bible, but I've put it here just for that:
  • by doing this, you can now have 2 points of view on the source code (mine is almost the same as the Bible, which re-inforces our interpretations on it...).

  • oh and yes, it's easier for you to have all the docs on the same site: I've got nothing against the Bible !
2) The files

Here are the C/C++ files, alpha-sorted in the first column and what is handled in it in the second one:

A   
 Afont.c fonts
 ahudgadg.cpp the player specific HUD gadget
 AI_Sight.c the NPC's view
 alt_tab.cpp saving & loading of surfaces & textures when player uses ALT+TAB keys
 Animchnk.cpp animated textures chunks
 animobs.cpp animated objects
 AvP_EnvInfo.c basic information for each specie level
 AvP_Intro.cpp introduction animations
 AvP_MenuData.c menus data
 AvP_MenuGfx.cpp the menu display
 AvP_Menus.c the menu navigation
 AvP_MP_Config.cpp multiplayer games file configurations
 AvP_UserProfile.cpp players profiles
 Avpchunk.cpp generator chunks
 AvpReg.cpp the AvP configuration in the Windows registry
 Avpview.c the player's head position (i.e. the camera) & the displayed lights depending on it
 awBmpLd.cpp loading of bitmap files
 awIffLd.cpp loading of IFF files
 awPnmLd.cpp loading of PNM files
 awTexLd.cpp loading of textures
B   
 bh_agun.c sentry guns behavior
 bh_ais.c common species behaviors
 Bh_alien.c NPC aliens behavior
 Bh_binsw.c binary switches behavior
 bh_cable.c predators grappling hook behavior
 bh_corpse.c corpses behavior
 bh_deathvol.c death volumes behavior
 Bh_debri.c fragments / debris behavior
 bh_dummy.c dummy (static) NPC behavior
 bh_fan.c fans behavior
 bh_far.c NPC behavior in the "far" ai mode
 Bh_fhug.c NPC facehuggers behavior
 Bh_gener.c NPC generators behavior
 bh_ldoor.c lift doors behavior
 bh_lift.c lifts behavior
 bh_light.c lights behavior
 Bh_lnksw.c linked switches behavior
 bh_ltfx.c light effects behavior
 Bh_marin.c NPC marines behavior
 bh_mission.c mission objectives behavior
 Bh_near.c NPC behavior in the "near" ai mode
 bh_pargen.c particle generators behavior
 bh_plachier.c placed hierarchies behavior
 bh_plift.c platform lifts behavior
 Bh_pred.c NPC predators behavior
 bh_queen.c NPC alien queens behavior
 bh_RubberDuck.c foating in water objects behavior
 bh_selfdest.c NPC predator's self destruction
 bh_snds.c placed sounds behavior
 bh_spcl.c xenomorph rooms behavior
 Bh_swdor.c binary switch-activated doors behavior
 bh_track.c marine's motion tracker behavior
 Bh_types.c general behaviors for various behavior blocks
 bh_videoscreen.c video screens behavior
 bh_waypt.c routes & waypoints behaviors
 bh_weap.c weapons behavior
 Bh_xeno.c NPC xenoborgs behavior
 bink.c strange background menu animation (an egg ?)
 Bmpnames.cpp bitmap names
 BonusAbilities.c predator's grappling hook functions
C   
 cconvars.cpp gameplay specific console commands & variables
 CD_player.c audio CD functions
 CDTrackSelection.cpp audio CD tracks selection depending levels
 Cheat.c cheat commands processing & "giveallweapons" cheat command
 CheatModes.c cheat modes informations
 chnkload.cpp loading of chunks
 Chnktexi.cpp loading of images to become textures
 Chnktype.cpp typed chunks (ex.: "float chunk", "shape chunk", ...)
 chtcodes.cpp cheat codes structure & immortality system
 Chunk.cpp common chunks
 Chunkpal.cpp environment palette chunks
 comp_map.c precompiled level maps
 Comp_shp.c precompiled shapes
 consbind.cpp key binding with console commands
 consbtch.cpp console batch file processing
 conscmnd.cpp console commands processing
 ConsoleLog.cpp console logs to text file
 conssym.cpp console symbols
 consvar.cpp console variables processing
 Coordstr.cpp coordinates with strategies daemons
 Cube.c precompiled cubes
D   
 d3_func.cpp DirectX immediate mode system
 d3d_hud.cpp HUD rendering with Direct3D
 d3d_render.cpp main Direct3D rendering
 Daemon.cpp root daemon code
 davehook.cpp last AvP patches (new vars & commands, gadgets, daemons & system functions handling)
 db.c basic debugging system
 Dd_func.cpp DirectDraw routines
 Ddplat.cpp HUD & menu screens rendering with DirectDraw
 deaths.c deaths descriptions
 Debuglog.cpp debug logs on files
 decal.c decals system (blood, scorchmarks, ...)
 DetailLevels.c graphical detail levels system
 Di_func.cpp DirectInput routines
 DirectPlay.c connections & sessions handling with DirectPlay
 Dp_func.c DirectPlay routines
 DummyObjectChunk.cpp dummy (static) object chunks
 dx_proj.cpp video driver handling with DirectX
 Dxlog.c DirectX logs on files
 Dynamics.c dynamic routines for physics
 Dynblock.c dynamic blocks system
E   
 endianio.c little endian writing / loading routines on files
 Enumchnk.cpp enum chunks
 Enumsch.cpp surfaces enum chunks
 Envchunk.cpp environment data chunks
 Equipmnt.c weapons & ammo descriptions
 equiputl.cpp weapon magazines & rounds identifiers handling functions
 extents.c collisions extents for game characters
F   
 fail.c error handling functions
 Ffread.cpp fastfile reading / writing functions
 Ffstdio.cpp fastfile handling
 fragchnk.cpp debris / fragments chunks
 frustrum.c clipping & viewing frustum functions
G   
 gadget.cpp root gadget interface
 Game.c main game routines
 game_statistics.c in-game statistics routines
 gamecmds.cpp gameplay specific console commands
 gameflow.c game data flow system
 gamevars.cpp gameplay specific console variables
 GammaControl.cpp controls gamma
 gflwplat.c mission objectives handling system with game data flow
 Gsprchnk.cpp sprite chunks
H   
 hierchnk.cpp hierachy chunks
 hierplace.cpp placed hierachy chunks
 HModel.c 3D game models handling
 Hud.c main HUD handling system
 hudgadg.cpp gadgets linked to HUD
 huffman.cpp Huffman system
I   
 iff.cpp iff textures handling
 iff_ILBM.cpp iff chunks
 ILBM_ext.cpp transparent iff chunks
 indexfnt.cpp indexing of fonts
 intro.cpp game introduction sequences
 Inventry.c player's inventory & pickups
 io.c system functions (originally inputs / outputs on devices)
 iofocus.cpp manages whether the console is visible or not for writing
J   
 jsndsup.cpp game sounds routines
K   
 Kshape.c shapes & lightings rendering
 Kzsort.c z buffer sorting on modules
L   
 Langplat.c languages handling
 Language.c text strings loading depending on current language
 Lighting.c lighting interface for simple effects
 list_tem.cpp debugging messages related to linked lists
 load_shp.c shapes loading
 los.c line of sight routines
 Ltchunk.cpp light chunks
M   
 Map.c maps handling
 Maps.c maps processing
 Maths.c mathematic routines
 md5.c MD5 system
 media.cpp routines for basic data types reading / writing on files
 mem3dc.c memory allocation recordings
 Mem3dcpp.cpp memory allocations tracking
 mempool.c main game memory allocation routines
 MessageHistory.c messages history handling
 Mishchnk.cpp miscellaneous chunks
 missions.cpp missions objectives routines
 modcmds.cpp module console commands
 Module.c modules routines
 Morph.c objects morphing routines
 MouseCentreing.cpp mouse pointer position handling to avoid off-screen clicks
 movement.c movement statistics for NPCs
 mp_launch.c MPlayer interface
 Mslhand.c main shape list handling
N   
 Npcsetup.cpp NPCs initializing routines
O   
 Obchunk.cpp object chunks
 Object.c objects handling
 Objsetup.cpp objects initializing routines
 OEChunk.cpp environment object chunks
 Our_mem.c basic memory allocation routines
P   
 Paintball.c "paintball" mode routines
 particle.c particle system
 PathChnk.cpp path chunks
 Pcmenus.cpp video modes & game menus on PC
 Pfarlocs.c alien module locations in the "far" ai mode
 Pheromon.c pheromone system
 plat_shp.c shapes management
 Platsup.c platform specific C functions
 Player.c player management
 Pldghost.c ghosts management
 Pldnet.c multiplayer networking routines
 plspecfn.c platform specific functions
 Pmove.c player's movements management
 progress_bar.cpp level loading progress bar management
 Projload.cpp various loading / initializing functions
 Psnd.c sound management
 Psndplat.c platform specific sound management
 Psndproj.c gameplay specific sound management
 Pvisible.c objects visibility management system
R   
 r2base.cpp 2D rendering management
 r2pos666.cpp 2D rendering positions daemon
 reflist.cpp debugging message related to object reference lists
 refobj.cpp object reference management
 rentrntq.cpp messages queue analogous to those of Windows
 rootgadg.cpp root gadget code
S   
 savegame.c game saving & loading management
 scream.cpp screaming & taunting for different species
 Scrshot.cpp screenshots management
 scstring.cpp graphical text strings management
 SecStats.c statistics for 3D model sections
 sfx.c special effects management
 shpanim.c animated shapes processing
 Shpchunk.cpp shape chunks
 smacker.c smk file handling
 Sndchunk.cpp sound chunks
 sphere.c precompiled spheres
 Sprchunk.cpp other sprite chunks
 Strachnk.cpp strategy chunks
 Stratdef.c strategy blocks managament
 String.cpp basic character strings management
 strtab.cpp main character strings management
 strutil.c character strings utils
 system.c Windows system functions
T   
 t_ingadg.cpp text input gadget
 Tables.c mathematic tables
 tallfont.cpp fonts rendering
 targeting.c weapon targeting code
 teletype.cpp graphical cursor gadget
 Texio.c inputs / outputs on textures
 textexp.cpp text expansion system
 textin.cpp text input state system
 Toolchnk.cpp camera chunks
 track.c marine's motion tracker management
 trepgadg.cpp text report gadget
 trig666.cpp trigger daemon
 Triggers.c gameplay triggers
 Txioctrl.cpp image manipulations
U   
 Usr_io.c user controls management
V   
 Vdb.c view descriptor blocks routines
 version.c processes "version" command output
 VideoModes.cpp video modes handling with DirectX
 Vision.c vision modes system
 Vramtime.c video RAM waiting routine
W   
 Weapons.c weapons system
 win_func.cpp AvP independant Windows functions
 win_proj.cpp AvP dependant Windows functions
 winmain.c game's entry point
 wpchunk.cpp waypoint chunks
 wrapstr.cpp character string word-wrapping management
Z   
 Zsp.cpp Z space partition chunks

Wow ! damn big list huh ?!
To see now how I classified these files, I suggest you to see the next section: "The files by topics"