Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jun 25, 2013
1 parent b8bb284 commit 14acc2b
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion doomsday/client/include/def_data.h
Expand Up @@ -139,7 +139,7 @@ typedef struct {
ded_anystring_t execute; // Console command.
} ded_state_t;

typedef struct {
typedef struct ded_light_s {
ded_stateid_t state;
char uniqueMapID[64];
float offset[3]; /* Origin offset in world coords
Expand Down
10 changes: 7 additions & 3 deletions doomsday/client/include/render/rend_main.h
Expand Up @@ -28,13 +28,15 @@
# error "render/rend_main.h requires C++"
#endif

//#include <math.h>

#include "dd_types.h"

#include "MaterialVariantSpec"
#include "WallEdge"

namespace de {
class Map;
}

#define GLOW_HEIGHT_MAX (1024.f) /// Absolute maximum

#define OMNILIGHT_SURFACE_LUMINOSITY_ATTRIBUTION_MIN (.05f)
Expand Down Expand Up @@ -63,6 +65,8 @@ DENG_EXTERN_C float extraLightDelta;
DENG_EXTERN_C int devRendSkyMode;
DENG_EXTERN_C int gameDrawHUD;

DENG_EXTERN_C int useBias;

DENG_EXTERN_C int useDynLights;
DENG_EXTERN_C float dynlightFactor, dynlightFogBright;

Expand All @@ -87,7 +91,7 @@ void Rend_Register();
void Rend_Init();
void Rend_Shutdown();
void Rend_Reset();
void Rend_RenderMap();
void Rend_RenderMap(de::Map &map);

/**
* @param useAngles @c true= Apply viewer angle rotation.
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/world/thinkers.h
Expand Up @@ -75,7 +75,7 @@ class Thinkers
* @param context Passed to the callback function.
*/
int iterate(thinkfunc_t thinkFunc, byte flags,
int (*callback) (thinker_t *th, void *), void *context);
int (*callback) (thinker_t *th, void *), void *context = 0);

/**
* Locates a mobj by it's unique identifier in the map.
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/src/gl/gl_tex.cpp
Expand Up @@ -21,6 +21,8 @@
#include <cmath>
#include <cctype>

#include <de/vector1.h>

#include "de_platform.h"
#include "de_base.h"
#include "de_console.h"
Expand Down
5 changes: 3 additions & 2 deletions doomsday/client/src/render/lumobj.cpp
Expand Up @@ -1226,8 +1226,9 @@ void LO_UnlinkMobjLumobjs()
if(useDynLights) return;

// Mobjs are always public.
App_World().map().thinkers().iterate(reinterpret_cast<thinkfunc_t>(gx.MobjThinker),
0x1, LOIT_UnlinkMobjLumobj, NULL);
App_World().map().thinkers()
.iterate(reinterpret_cast<thinkfunc_t>(gx.MobjThinker), 0x1,
LOIT_UnlinkMobjLumobj);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions doomsday/client/src/world/p_particle.cpp
Expand Up @@ -1231,9 +1231,9 @@ void P_PtcGenThinker(ptcgen_t *gen)
App_World().map().clMobjIterator(PIT_ClientMobjParticles, gen);
}
#endif
App_World().map().thinkers().iterate(reinterpret_cast<thinkfunc_t>(gx.MobjThinker),
0x1 /*mobjs are public*/,
manyNewParticles, gen);
App_World().map().thinkers()
.iterate(reinterpret_cast<thinkfunc_t>(gx.MobjThinker), 0x1 /*mobjs are public*/,
manyNewParticles, gen);

// The generator has no real source.
gen->source = 0;
Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/world/p_ticker.cpp
Expand Up @@ -130,7 +130,7 @@ void P_Ticker(timespan_t elapsed)
Sky_Ticker();

// Check all mobjs (always public).
map.thinkers().iterate(reinterpret_cast<thinkfunc_t>(gx.MobjThinker),
0x1, P_MobjTicker, NULL);
map.thinkers().iterate(reinterpret_cast<thinkfunc_t>(gx.MobjThinker), 0x1,
P_MobjTicker);
}
}
4 changes: 2 additions & 2 deletions doomsday/client/src/world/plane.cpp
Expand Up @@ -85,6 +85,8 @@ DENG2_PIMPL(Plane)

~Instance()
{
DENG2_FOR_PUBLIC_AUDIENCE(Deletion, i) i->planeBeingDeleted(self);

#ifdef __CLIENT__
Map &map = App_World().map();

Expand All @@ -105,8 +107,6 @@ DENG2_PIMPL(Plane)
map.decoratedSurfaces().remove(&surface);

#endif // __CLIENT__

DENG2_FOR_PUBLIC_AUDIENCE(Deletion, i) i->planeBeingDeleted(self);
}

void notifyHeightChanged(coord_t oldHeight)
Expand Down
3 changes: 2 additions & 1 deletion doomsday/client/src/world/thinkers.cpp
Expand Up @@ -25,6 +25,7 @@
#include <de/memoryzone.h>

#include "de_base.h"
#include "world/map.h"
#include "world/p_object.h"

#ifdef __CLIENT__
Expand Down Expand Up @@ -407,7 +408,7 @@ void Thinker_Init()
void Thinker_Run()
{
if(!App_World().hasMap()) return;
App_World().map().thinkers().iterate(NULL, 0x1 | 0x2, runThinker, NULL);
App_World().map().thinkers().iterate(NULL, 0x1 | 0x2, runThinker);
}

#undef Thinker_Add
Expand Down

0 comments on commit 14acc2b

Please sign in to comment.