Coding style...
Coding style...
Is there a coding style guide somewhere ?
Because honestly I don't really understand this coding style (mixed C/C++,Code in headers, useless inlines)...
Or at least if you could explain to me ?
Because honestly I don't really understand this coding style (mixed C/C++,Code in headers, useless inlines)...
Or at least if you could explain to me ?
Damien Gerard
Ta3d & Yuni Developer
Ta3d & Yuni Developer
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
well ... in fact there is no official coding style
There are only a few rules:
* don't use too much exceptions (since it prevents debugging efficiently)
* "short" functions usually go in headers, but "short" isn't very well defined here, we're slowly moving functions from headers to .cpp files
* put in the same modules stuffs that do one task (so we don't have things like ai_* modules)
* we mostly use objects for things that really are objects in TA3D (ie units, weapons, unit engine, weapon engine, ...), for example you won't see an object for the renderer (it's split into engine modules, except for water rendering which is done in the main loop considered as the renderer/user interaction loop)
if you need details about modules you can look at the doc/dev.txt file, but it has not been updated since we started networking code ...
There are only a few rules:
* don't use too much exceptions (since it prevents debugging efficiently)
* "short" functions usually go in headers, but "short" isn't very well defined here, we're slowly moving functions from headers to .cpp files
* put in the same modules stuffs that do one task (so we don't have things like ai_* modules)
* we mostly use objects for things that really are objects in TA3D (ie units, weapons, unit engine, weapon engine, ...), for example you won't see an object for the renderer (it's split into engine modules, except for water rendering which is done in the main loop considered as the renderer/user interaction loop)
if you need details about modules you can look at the doc/dev.txt file, but it has not been updated since we started networking code ...
=>;-D Penguin Powered
Who is online
Users browsing this forum: No registered users and 12 guests