Code File Structure: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Replaced content with "Need rules here for new developers. <adejr> I'll try to fill in some information == General information == In general, try to follow the existing structure as you see it. ...")
Line 1: Line 1:
Map of original Arx Fatals source file names to current Arx Libertatis files.
Need rules here for new developers.


== audio (Athena) ==
<adejr> I'll try to fill in some information


{| class="wikitable sortable" style="width:800px"
== General information ==
! Original Name
! Current Name
|-
| Athena/<b>Athena_Ambiance</b>.cpp
| audio/<b>Ambiance</b>.cpp
|-
| Athena/<b>Athena</b>.cpp
| audio/<b>Audio</b>.cpp
|-
| Athena/<b>Athena_DLL</b>.cpp
| <i>(removed)</i>
|-
| Athena/<b>Athena_Environment</b>.cpp
| audio/<b>AudioEnvironment</b>.cpp
|-
| Athena/<b>Athena_FileIO</b>.cpp
| <i>(removed)</i>
|-
| Athena/<b>Athena_Global</b>.cpp
| audio/<b>AudioGlobal</b>.cpp
|-
| Athena/<b>Athena_Instance</b>.cpp
| audio/<b>AudioSource</b>.cpp (and <code>dsound</code>/<code>openal</code>-specific code)
|-
| Athena/<b>Athena_Mixer</b>.cpp
| audio/<b>Mixer</b>.cpp
|-
| Athena/<b>Athena_Resource</b>.cpp
| audio/<b>AudioResource</b>.cpp
|-
| Athena/<b>Athena_Sample</b>.cpp
| audio/<b>Sample</b>.cpp
|-
| Athena/<b>Athena_Stream</b>.cpp
| audio/<b>Stream</b>.cpp
|-
| Athena/<b>Athena_Track</b>.cpp
| <i>(removed?)</i>
|}


=== codec ===
In general, try to follow the existing structure as you see it.


{| class="wikitable sortable" style="width:800px"
Minimize the functionality in files and try to follow modern c++ standards.
! Original Name
! Current Name
|-
| Athena/<b>Athena_Stream_WAV</b>.cpp
| audio/<b>codec/WAV</b>.cpp
|-
| Athena/<b>Athena_Stream_ASF</b>.cpp
| <i>(removed)</i>
|-
| Athena/<b>Athena_CoDec_ADPCM</b>.cpp
| audio/<b>codec/ADPCM</b>.cpp
|-
| Athena/<b>Athena_Codec_RAW</b>.cpp
| audio/<b>codec/RAW</b>.cpp
|}


== game ==
Name files for their content (nouns), not for their actions (verbs).


{| class="wikitable sortable" style="width:800px"
Don't be afraid to ask for help if you can't decide what to name a file!
! Original Name
! Current Name
|-
| DANAE/<b>ARX_carte</b>.cpp
| game/<b>Map</b>.cpp
|-
| DANAE/<b>ARX_Damages</b>.cpp
| game/<b>Damage</b>.cpp
|-
| DANAE/<b>ARX_Equipment</b>.cpp
| game/<b>Equipment</b>.cpp
|-
| DANAE/<b>ARX_Inventory</b>.cpp
| game/<b>Inventory</b>.cpp
|-
| DANAE/<b>ARX_Levels</b>.cpp
| game/<b>Levels</b>.cpp
|-
| DANAE/<b>ARX_NPC</b>.cpp
| game/<b>NPC</b>.cpp
|-
| DANAE/<b>ARX_Missile</b>.cpp
| game/<b>Missile</b>.cpp
|-
| DANAE/<b>ARX_Spells</b>.cpp
| game/<b>Spells</b>.cpp
|-
| DANAE/<b>ARX_Player</b>.cpp
| game/<b>Player</b>.cpp
|}
 
== io (HERMES) ==
{| class="wikitable sortable" style="width:800px"
! Original Name
! Current Name
|-
| HERMES/<b>HERMES_ClusterSave</b>.cpp
| io/<b>SaveBlock</b>.cpp
|-
| HERMES/<b>HERMES_hachage</b>.cpp
| <i>(removed)</i>
|-
| HERMES/<b>HERMES_pack</b>.cpp
| io/<b>PakEntry</b>.cpp
|-
| HERMES/<b>HERMES_pack_public</b>.cpp
| io/<b>PakReader</b>.cpp
|-
| HERMES/<b>HERMES_PAK</b>.cpp
| <i>(removed)</i>
|-
| HERMES/<b>HERMESconsole</b>.cpp
| <i>(removed)</i>
|-
| HERMES/<b>HERMESDDE</b>.cpp
| <i>(removed)</i>
|-
| HERMES/<b>HERMESmain</b>.cpp
| io/<b>IO</b>.cpp <i>(mostly removed)</i>
|-
| HERMES/<b>HERMESnet</b>.cpp
| <i>(removed)</i>
|-
| HERMES/<b>HERMESPerf</b>.cpp
| <i>(removed)</i>
|-
| DANAE/<b>ARX_C_loadsave</b>.cpp
| io/<b>CinematicLoad</b>.cpp
|-
| DANAE/<b>ARX_Snapshot</b>.cpp
| io/<b>Screenshot</b>.cpp
|}
 
== scripting ==
 
{| class="wikitable sortable" style="width:800px"
! Original Name
! Current Name
|-
| DANAE_Debugger/<b>SCRIPT_DEBUGGER_Dialog</b>.cpp
| script/<b>ScriptDebuggerDialog</b>.cpp
|-
| DANAE/<b>ARX_Script</b>.cpp
| <b>script/*</b> <i>(many files)</i>
|-
| DANAE/<b>DANAE_Debugger</b>.cpp
| script/<b>ScriptDebugger</b>.cpp
|}
 
== graphics (EERIE) ==
 
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| EERIEDraw.cpp
| Draw
| Low level render stuff like EERIEDrawSprite
|-
| EERIEenum.cpp
| GraphicsEnum
|
|-
| EERIEFrame.cpp
| Frame
|
|-
| EERIEMath.cpp
| Math
|
|-
| EERIEutil.cpp
| GraphicsUtility
|
|-
| ARX_GlobalMods.cpp
| GraphicsModes
| FOG related d3d stuff
|}
 
=== particle ===
 
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_CParticle.cpp
| Particle
| CParticle class
|-
| ARX_CParticles.cpp
| ParticleManager
| CParticleManager class
|-
| ARX_CParticleSystem.cpp
| ParticleSystem
| CParticleSystem class
|-
| ARX_Particles.cpp
| ParticleEffects
| Specific particle effect generation
|}
 
=== effects ===
 
High level graphics functions like makeMeANiceRainbow()
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_C_fx.cpp
| CinematicEffects
|
|-
| ARX_CSpellFx.cpp
| SpellEffects
|
|-
| ARX_Fogs.cpp
| Fog
| TODO: Meaningfull name
|-
| ARX_Draw.cpp
| DrawEffects
| High level stuff like ARXDRAW_DrawEyeBall
|}
 
=== spells ===
 
some hardcodet animations, should be abstracted and persisted (xml or such?)
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_SpellFX_Lvl01.cpp
| Spells01
|
|-
| ARX_SpellFX_Lvl02.cpp
| Spells02
|
|-
| ARX_SpellFX_Lvl03.cpp
| Spells03
|
|-
| ARX_SpellFX_Lvl04.cpp
| Spells04
|
|-
| ARX_SpellFX_Lvl05.cpp
| Spells05
|
|-
| ARX_SpellFX_Lvl06.cpp
| Spells06
|
|-
| ARX_SpellFX_Lvl07.cpp
| Spells07
|
|-
| ARX_SpellFX_Lvl08.cpp
| Spells08
|
|-
| ARX_SpellFX_Lvl09.cpp
| Spells09
|
|-
| ARX_SpellFX_Lvl10.cpp
| Spells10
|
|}
 
=== data ===
 
Graphics data structure and manipulation (texture / mesh)
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| EERIEMeshTweak.cpp
| MeshManipulation
|
|-
| EERIEPoly.cpp
| Mesh
|
|-
| EERIEProgressive.cpp
| Progressive
|
|-
| EERIETexture.cpp
| Texture
|
|-
| ARX_C_mapp.cpp
| CinematicTexture
| bitmap , texture, uv stuff, even vertex for CINEMATIQUE
|-
| ARX_FTL.cpp
| FTL
| FTL file reader
|}
 
== scene ==
 
Higher level assets managment
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_Scene.cpp
| Scene
|
|-
| EERIEobject.cpp
| Object
| Asset loading
|-
| EERIELight.cpp
| Light
|
|-
| EERIELinkedObj.cpp
| LinkedObject
|
|-
| ARX_Interactive.cpp
| Interactive
| gore stuff, npc, animation, io, camera, a lot of stuff
|-
| ARX_ChangeLevel.cpp
| ChangeLevel
|
|-
| DanaeSaveLoad.cpp
| LoadLevel
| Loads DLF Files, Level initialization, Progress Bar
|-
| ARX_C_sound.cpp
| CinematicSound
| used in c_cinematic and c_loadsave. c managment of C_SOUND
|-
| ARX_Sound.cpp
| GameSound
| Game related Audio Code. Probably better to keep the highler-level sound files ARX_* separated from lower-level Athena
|}
 
== physics ==
 
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_Collisions.cpp
| Collisions
|
|-
| ARX_Physics.cpp
| Physics
|
|-
| EERIEClothes.cpp
| Clothes
|
|-
| EERIECollisionSpheres.cpp
| CollisionShapes
| also creates a Cylinder
|-
| EERIEPhysicsBox.cpp
| Box
|
|-
| ARX_Special.cpp
| Actors
| "ATTRACTORS" actor management with io
|-
| EERIEAnchors.cpp
| Anchors
| seems to do collision shapes and detection related things. i could be wrong though.
|}
 
== animation ==
 
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_C_cinematique.cpp
| Cinematic
|
|-
| ARX_C_keyframer.cpp
| CinematicKeyframer
|
|-
| ARX_Intro.cpp
| Intro
|
|-
| EERIEAnim.cpp
| Animation
|
|-
| ARX_Cedric.cpp
| AnimationRender
| all kinds of graphics, a lot of animation.
|}
 
== gui ==
 
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_Interface.cpp
| Interface
|
|-
| ARX_Menu2.cpp
| MenuWidgets
| Holds classes: CMenuZone, CMenuAllZone, CMenuElement, CMenuPanel, CMenuElementText, CMenuButton (etc). Should be split into seperate files
|-
| ARX_Menu.cpp
| Menu
|
|-
| ARX_MenuPublic.cpp
| MenuPublic
|
|-
| ARX_Minimap.cpp
| MiniMap
|
|-
| ARX_Text.cpp
| Text
|
|-
| ARX_ViewImage.cpp
| ViewImage
|
|-
| ARX_Speech.cpp
| Speech
| This isn't actually audio related. Text conversation rendering.
|}
 
== ai (MINOS) ==
 
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_Paths.cpp
| Paths
|
|-
| Minos_PathFinder.cpp
| PathFinder
|
|-
| EERIEPathfinder.cpp
| PathFinderManager
|
|}
 
== core (DANAE) ==
 
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_Common.cpp
| Common
|
|-
| ARX_Config.cpp
| Config
|
|-
| ARX_Time.cpp
| Time
|
|-
| Danae.cpp
| Core
| A lot of code should be extracted. StateManager(?)
|-
| DanaeDlg.cpp
| Dialog
|
|-
| ARX_Loc.cpp
| Localization
| localization (could also fit in gui?)
|-
| ARX_LocHash.cpp
| LocalizationHash
| further localization code
|-
| EERIEApp.cpp
| Application
| render code, input and window setup. a lot of this should go into state managment and window.
|-
| EERIE_AVI.cpp
| AVI
| plays avi files. could be put into audio and renamed to media ;) ?
|}
 
== input (Mercury) ==
 
Context creation, Window Management, Input
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| Mercury_global.cpp
| DXInputGlobal
| Some globals. No runtime code. Should be merged
|-
| Mercury_Main.cpp
| DXInput
|
|-
| Mercury_extern.h
| DXInputGlobal
|
|-
| Mercury_dx_input.h
| DXInput
|
|-
| ARX_Input.cpp
| Input
| Some input abstraction, but still contains DInput
|}

Revision as of 17:18, 2 February 2012

Need rules here for new developers.

<adejr> I'll try to fill in some information

General information

In general, try to follow the existing structure as you see it.

Minimize the functionality in files and try to follow modern c++ standards.

Name files for their content (nouns), not for their actions (verbs).

Don't be afraid to ask for help if you can't decide what to name a file!