Code File Structure: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
No edit summary
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
I gather some ideas about restructuring the code and describe some code files here.
Need rules here for new developers.


===audio===
== General information ==
I suppose a lot of this code will become useless when we find a cross platform audio library to replace it.
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| Athena_Ambiance.cpp
| Ambient
|
|-
| Athena.cpp
| Audio
|
|-
| Athena_Environment.cpp
| Environment
|
|-
| Athena_Global.cpp
| AudioGlobal
|
|-
| Athena_Instance.cpp
| AudioInstance
|
|-
| Athena_Mixer.cpp
| Mixer
|
|-
| Athena_Resource.cpp
| AudioResource
|
|-
| Athena_Sample.cpp
| Sample
|
|-
| Athena_Stream.cpp
| Stream
|
|-
| Athena_Track.cpp
| Track
|
|}
=====codec=====
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| Athena_Stream_WAV.cpp
| WAV
| CodecWAV?
|-
| Athena_CoDec_ADPCM.cpp
| ADPCM
| CodecADPCM?
|-
| Athena_Codec_RAW.cpp
| RAW
| CodecRAW?
|}


===game===
In general, try to follow the existing structure as you see it.  
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_carte.cpp
| Map
|
|-
| ARX_Damages.cpp
| Damage
|
|-
| ARX_Equipment.cpp
| Equipment
|
|-
| ARX_Inventory.cpp
| Inventory
|
|-
| ARX_Levels.cpp
| Levels
|
|-
| ARX_NPC.cpp
| NPC
|
|-
| ARX_Missile.cpp
| Missile
|
|-
| ARX_Spells.cpp
| Spells
|
|-
| ARX_Player.cpp
| Player
|
|}


===io===
Minimize the functionality in files and try to follow modern c++ standards.
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| blast.cpp
| Blast
|
|-
| Filesystem.cpp
| Filesystem
|
|-
| HashMap.cpp
| HashMap
|
|-
| HERMES_ClusterSave.cpp
| ClusterSave
|
|-
| HERMESmain.cpp
| IO
| TODO: Meaningfull name
|-
| HERMESnet.cpp
| Registry
| Writes and Reads Windows Registry Keys.
|-
| Logger.cpp
| Logger
|
|-
| PakEntry.cpp
| PakEntry
|
|-
| PakManager.cpp
| PakManager
|
|-
| PakReader.cpp
| PakReader
|
|-
| ARX_C_loadsave.cpp
| CinematicLoad
|
|-
| ARX_Snapshot.cpp
| ScreenShot
| write screen shot file
|}


===scripting===
Name files for their content (nouns), not for their actions (verbs).
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| SCRIPT_DEBUGGER_Dialog.cpp
| ScriptDebuggerDialog
|
|-
| ARX_Script.cpp
| Script
|
|-
| DANAE_Debugger.cpp
| ScriptDebugger
|
|}


===graphics===
Don't be afraid to ask for help if you can't decide what to name a file!
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| EERIEDraw.cpp
| Draw
|
|-
| EERIEenum.cpp
| GraphicsEnum
|
|-
| EERIEFrame.cpp
| Frame
|
|-
| EERIEMath.cpp
| Math
|
|-
| EERIEutil.cpp
| GraphicsUtility
|
|-
| ARX_Draw.cpp
| Draw2
|
|-
| ARX_Cedric.cpp
| Graphics / I dont know
| all kinds of graphics related stuff
|}
=====particle=====
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_CParticle.cpp
| Particle
| TODO: Meaningfull name
|-
| ARX_CParticles.cpp
| Particles
| TODO: Meaningfull name
|-
| ARX_CParticleSystem.cpp
| ParticleSystem
|
|-
| ARX_Particles.cpp
| Particles2
| TODO: Meaningfull name
|}


=====effects=====
[[Category:Development information]]
{| 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_GlobalMods.cpp
| Fog2
| FOG related d3d stuff TODO: Meaningfull name
|}
 
=====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
| CollisionSpheres
|
|-
| 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
|
|}
 
===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===
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| ARX_Paths.cpp
| Paths
|
|-
| Minos_PathFinder.cpp
| PathFinder
|
|-
| EERIEPathfinder.cpp
| PathFinderManager
|
|}
 
===core===
{| 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 / StateManager
| A lot of code should be extracted
|-
| DanaeDlg.cpp
| Dialog
|
|-
| ARX_Loc.cpp
| Localization
| localization (could also fit in gui?)
|-
| ARX_LocHash.cpp
| LocalizationHash
| further localization code
|-
| EERIEApp.cpp
| Application
| rendering, input and window setup. this should be separated.
|-
| EERIE_AVI.cpp
| AVI
| plays avi files. could be put into audio and renamed to media ;) ?
|}
 
===window===
Context creation, Window Management, Input
{| class="wikitable sortable" style="width:800px"
! Old Name
! Proposition
! Comment
|-
| Mercury_global.cpp
| DXWindow2
|
|-
| Mercury_Main.cpp
| DXWindow1
|
|-
| ARX_Input.cpp
| DXInput1
|
|}

Latest revision as of 01:03, 4 February 2012

Need rules here for new developers.

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!