Skip to content

Commit

Permalink
Cleanup: Removed de_defs.h
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jul 13, 2015
1 parent 5fc551a commit ac754ac
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 90 deletions.
36 changes: 0 additions & 36 deletions doomsday/apps/client/include/de_defs.h

This file was deleted.

26 changes: 6 additions & 20 deletions doomsday/apps/client/include/def_main.h
Expand Up @@ -23,6 +23,10 @@
#ifndef DEFINITIONS_MAIN_H
#define DEFINITIONS_MAIN_H

#ifndef __cplusplus
# error "def_main.h requires C++"
#endif

#include <vector>
#include <doomsday/defs/ded.h>
#include <doomsday/defs/dedtypes.h>
Expand Down Expand Up @@ -74,12 +78,8 @@ struct Array : public std::vector<PODType>
PODType *_elements;
};

#ifdef __cplusplus
extern "C" {
#endif

// the actual classes are game-side
struct xgclass_s;
extern ded_t defs; ///< Main definitions database (internal).
struct xgclass_s; ///< @note The actual classes are on game side.

struct sfxinfo_t
{
Expand All @@ -99,8 +99,6 @@ struct sfxinfo_t
ddstring_t external; ///< Path to external file.
};

extern ded_t defs; ///< Main definitions database (internal).

struct stateinfo_t
{
mobjinfo_t *owner;
Expand Down Expand Up @@ -174,21 +172,13 @@ ded_value_t *Def_GetValueByUri(uri_s const *uri);
ded_compositefont_t *Def_GetCompositeFont(char const *uri);
ded_light_t *Def_GetLightDef(int spr, int frame);

#ifdef __cplusplus
} // extern "C"
#endif

de::String Def_GetMobjName(int num);
de::String Def_GetStateName(state_t *state);
int Def_GetStateNum(de::String const &id);

ded_ptcgen_t *Def_GetGenerator(uri_s const *uri);
ded_ptcgen_t *Def_GetGenerator(de::Uri const &uri);

#ifdef __cplusplus
extern "C" {
#endif

ded_ptcgen_t *Def_GetDamageGenerator(int mobjType);

int Def_EvalFlags(char const *string);
Expand Down Expand Up @@ -220,8 +210,4 @@ bool Def_IsAllowedReflection(ded_reflection_t const *def, /*bool hasExternal,*/
*/
bool Def_IsAllowedDetailTex(ded_detailtexture_t const *def, /*bool hasExternal,*/ bool isCustom);

#ifdef __cplusplus
} // extern "C"
#endif

#endif // DEFINITIONS_MAIN_H
11 changes: 6 additions & 5 deletions doomsday/apps/client/include/world/generator.h
@@ -1,7 +1,7 @@
/** @file generator.h World map (particle) generator.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2006-2015 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -18,11 +18,12 @@
* 02110-1301 USA</small>
*/

#ifndef DENG_CLIENT_WORLD_GENERATOR_H
#define DENG_CLIENT_WORLD_GENERATOR_H
#ifndef CLIENT_WORLD_GENERATOR_H
#define CLIENT_WORLD_GENERATOR_H

#include "map.h"
#include <de/Vector>
#include <doomsday/defs/dedtypes.h>
#include "map.h"

class BspLeaf;
class Line;
Expand Down Expand Up @@ -256,4 +257,4 @@ typedef Generator::ParticleStage GeneratorParticleStage;
void Generator_Delete(Generator *gen);
void Generator_Thinker(Generator *gen);

#endif // DENG_CLIENT_WORLD_GENERATOR_H
#endif // CLIENT_WORLD_GENERATOR_H
3 changes: 1 addition & 2 deletions doomsday/apps/client/src/audio/s_sfx.cpp
@@ -1,7 +1,7 @@
/** @file s_sfx.cpp Sound Effects.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2014 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2006-2015 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2006-2007 Jamie Jones <jamie_jones_au@yahoo.com.au>
*
* @par License
Expand All @@ -22,7 +22,6 @@
#include "de_console.h"
#include "de_system.h"
#include "de_play.h"
#include "de_defs.h"
#include "de_graphics.h"
#include "de_audio.h"
#include "de_misc.h"
Expand Down
3 changes: 1 addition & 2 deletions doomsday/apps/client/src/dd_plugin.cpp
Expand Up @@ -4,7 +4,7 @@
* @todo Convert to C++, rename.
*
* @authors Copyright © 2003-2014 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2009-2014 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2009-2015 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -27,7 +27,6 @@

#include "api_plugin.h"
#include "de_console.h"
#include "de_defs.h"
#include "dd_main.h"
#include "dd_pinit.h"
#include "library.h"
Expand Down
12 changes: 7 additions & 5 deletions doomsday/apps/client/src/world/clientmobjthinkerdata.cpp
@@ -1,6 +1,7 @@
/** @file clientmobjthinkerdata.cpp Private client-side data for mobjs.
*
* @authors Copyright (c) 2014 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2014 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2015 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -16,14 +17,15 @@
* http://www.gnu.org/licenses</small>
*/

#include "de_base.h"
#include "world/clientmobjthinkerdata.h"

#include <QFlags>
#include "clientapp.h"
#include "dd_loop.h"
#include "render/modelrenderer.h"
#include "render/mobjanimator.h"
#include "world/generator.h"
#include "clientapp.h"
#include "dd_loop.h"
#include "def_main.h"
#include <QFlags>

using namespace de;

Expand Down
1 change: 0 additions & 1 deletion doomsday/apps/client/src/world/map.cpp
Expand Up @@ -25,7 +25,6 @@
#include "world/map.h"

#include "de_console.h" // Con_GetInteger
#include "de_defs.h"
#ifdef __CLIENT__
# include "clientapp.h"
#endif
Expand Down
3 changes: 1 addition & 2 deletions doomsday/apps/client/src/world/surface.cpp
@@ -1,7 +1,7 @@
/** @file surface.cpp World map surface.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2014 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2006-2015 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -26,7 +26,6 @@
#include <QtAlgorithms>
#include <de/vector1.h>
#include <de/Log>
//#include "de_defs.h" // Def_GetGenerator
#include "dd_loop.h" // frameTimePos
#include "r_util.h" // R_NameForBlendMode()

Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/world/worldsystem.cpp
Expand Up @@ -32,8 +32,8 @@
#include <doomsday/console/cmd.h>
#include <doomsday/console/exec.h>
#include <doomsday/console/var.h>
#include <doomsday/defs/mapinfo.h>

#include "de_defs.h"
#include "de_play.h"
#include "de_filesys.h"
#include "dd_main.h"
Expand Down
3 changes: 1 addition & 2 deletions doomsday/apps/server/CMakeLists.txt
@@ -1,6 +1,6 @@
# The Doomsday Engine Project -- Server
# Copyright (c) 2012-2015 Jaakko Keränen <jaakko.keranen@iki.fi>
# Copyright (c) 2012-2014 Daniel Swanson <danij@dengine.net>
# Copyright (c) 2012-2015 Daniel Swanson <danij@dengine.net>

cmake_minimum_required (VERSION 3.1)
project (DENG_SERVER)
Expand Down Expand Up @@ -39,7 +39,6 @@ set (SHARED_WITH_CLIENT
${src}/include/de_audio.h
${src}/include/de_base.h
${src}/include/de_console.h
${src}/include/de_defs.h
${src}/include/de_edit.h
${src}/include/de_filesys.h
${src}/include/de_graphics.h
Expand Down
27 changes: 13 additions & 14 deletions doomsday/apps/server/src/server/sv_main.cpp
@@ -1,5 +1,4 @@
/** @file sv_main.cpp Network server.
* @ingroup server
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2015 Daniel Swanson <danij@dengine.net>
Expand All @@ -18,26 +17,26 @@
* http://www.gnu.org/licenses</small>
*/

#include <cmath>

#define DENG_NO_API_MACROS_SERVER
#include "api_server.h"

#include "de_base.h"

#include <cmath>
#include <de/stringarray.h>
#include <de/ArrayValue>
#include <de/NumberValue>
#include <de/Log>

#include "de_console.h"
#include "de_system.h"
#include "de_filesys.h"
#include "de_network.h"
#include "de_play.h"
#include "de_misc.h"
#include "de_defs.h"
#include "def_main.h"

#include "api_materialarchive.h"

#include <de/stringarray.h>
#include <de/ArrayValue>
#include <de/NumberValue>
#include <de/Log>
#include "api_server.h"

using namespace de;

Expand Down Expand Up @@ -767,9 +766,9 @@ void Sv_PlayerLeaves(unsigned int nodeID)
static StringArray *listThingTypeIDs()
{
StringArray *array = StringArray_New();
for(dint i = 0; i < defs.things.size(); ++i)
for(dint i = 0; i < ::defs.things.size(); ++i)
{
StringArray_Append(array, defs.things[i].gets("id").toUtf8());
StringArray_Append(array, ::defs.things[i].gets("id").toUtf8());
}
return array;
}
Expand All @@ -783,9 +782,9 @@ static StringArray *listThingTypeIDs()
static StringArray *listStateIDs()
{
StringArray *array = StringArray_New();
for(dint i = 0; i < defs.states.size(); ++i)
for(dint i = 0; i < ::defs.states.size(); ++i)
{
StringArray_Append(array, defs.states[i].gets("id").toUtf8());
StringArray_Append(array, ::defs.states[i].gets("id").toUtf8());
}
return array;
}
Expand Down

0 comments on commit ac754ac

Please sign in to comment.