Tracker: Issueshttps://tracker.dengine.net/https://tracker.dengine.net/favicon.ico?13985035312015-05-03T09:11:56ZTracker
Redmine Doomsday Engine - Feature #2028 (New): libcommon uses the preprocessor excessively in order speci...https://tracker.dengine.net/issues/20282015-05-03T09:11:56Zrhargraveroman@hargrave.info
<p>As the title states, `common` makes <em>extreme</em> use of the C/++ preprocessor in order to provide specific modifications for one game or another.</p>
<p>For example, in `hu_lib.h` the following is defined:</p>
<pre>
#if __JDOOM__ || __JHERETIC__
typedef struct {
int slot;
keytype_t keytypeA;
patchid_t patchId;
# if __JDOOM__
keytype_t keytypeB;
patchid_t patchId2;
# endif
} guidata_keyslot_t;
#endif
</pre>
<p>If this such a type is only needed by <em>two</em> (<em>three</em> counting doom64) different plugins, then it should be defined at a plugin level, rather than putting it in the common plugin. On one hand, this will vastly reduce code fragmentation by moving single-plugin-only code in to the appropriate plugin, and on another it provides motivation to use some C++ features (as I understand, I fairly large portion of the code at hand was ported from C to C++, and as such was not written with classes, etc.. in mind).</p>
<p>Not knowing the nature of every usage off the top of my head, I would suggest redesigning this and similar situations as follows:</p>
<pre>
// in common/include/hu_lib.h
class guidata_keyslot_t {
// common things here
}
// in doom/include/_pick a name_
class guidata_doom_keyslot : public guidata_keyslot_t {
// common things here
}
</pre>
<p>Even furthermore, migrating static helper methods for these types in to such classes as instance methods would <em>drastically</em> reduce the number of symbols in the global namespace, which would help for (among other things) debugging, code clarity, and code sharing.</p> Doomsday Engine - Feature #1252 (Progressed): Integrate Hexen features into libcommonhttps://tracker.dengine.net/issues/12522003-07-29T06:11:25Zbluelegsbluelegs@users.sourceforge.net
<p>Heretic and Hexen features in Doom would be really cool<br />and seeing as you're combining them all for your 2.0<br />release, i'm thinking that it would be really great if<br />we could use various features accross all 3 games (and<br />maybe you could even expand on them) . Some of these<br />features are but not limited to :</p>
<p>Hexen's phased lighting<br />Scrolling floors and water currents<br />Slippery floors (Ice)<br />Wind<br />Multiple character selection (classes! would we be able<br />to make Doom:Team Fortress?)<br />Item inventory<br />Flying<br />Swinging doors<br />Environmental effects (blowing leaves and lightning etc<br />etc)</p>
<p><strong>Labels:</strong> Gameplay</p>