Skip to content

Commit

Permalink
Server: Fixing missing symbol errors
Browse files Browse the repository at this point in the history
A lot of audiovisual functional is not present in the server build;
it needs to be replaced with empty stubs.
  • Loading branch information
skyjake committed Dec 23, 2012
1 parent 185f132 commit 07daf8e
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 17 deletions.
9 changes: 6 additions & 3 deletions doomsday/engine/src/busymode.cpp
Expand Up @@ -241,9 +241,6 @@ static void preBusySetup(int initialMode)
{
Con_TransitionConfigure();
}
#else
DENG_UNUSED(initialMode);
#endif

busyWasIgnoringInput = DD_IgnoreInput(true);

Expand All @@ -258,10 +255,15 @@ static void preBusySetup(int initialMode)
BusyVisual_LoadTextures();

Window_SetDrawFunc(Window_Main(), 0);

#else
DENG_UNUSED(initialMode);
#endif
}

static void postBusyCleanup(void)
{
#ifdef __CLIENT__
// Discard input events so that any and all accumulated input events are ignored.
DD_IgnoreInput(busyWasIgnoringInput);
DD_ResetTimer();
Expand All @@ -273,6 +275,7 @@ static void postBusyCleanup(void)

// Resume drawing with the game loop drawer.
Window_SetDrawFunc(Window_Main(), !Sys_IsShuttingDown()? DD_GameLoopDrawer : 0);
#endif
}

/**
Expand Down
3 changes: 3 additions & 0 deletions doomsday/engine/src/map/r_world.cpp
Expand Up @@ -1459,6 +1459,7 @@ boolean R_IsGlowingPlane(Plane const *pln)
}
return Surface_IsSkyMasked(&pln->surface);
#else
DENG_UNUSED(pln);
return false;
#endif
}
Expand All @@ -1478,6 +1479,8 @@ float R_GlowStrength(Plane const *pln)
return ms.glowStrength();
}
}
#else
DENG_UNUSED(pln);
#endif
return 0;
}
Expand Down
4 changes: 4 additions & 0 deletions doomsday/engine/src/render/r_main.c
Expand Up @@ -207,6 +207,8 @@ static void loadFontIfNeeded(const char* uri, fontid_t* fid)

void R_LoadSystemFonts(void)
{
#ifdef __CLIENT__

if(!Fonts_IsInitialized() || isDedicated) return;

loadFontIfNeeded(R_ChooseFixedFont(), &fontFixed);
Expand All @@ -215,6 +217,8 @@ void R_LoadSystemFonts(void)
loadFontIfNeeded(R_ChooseVariableFont(FS_LIGHT, Window_Width(theWindow), Window_Height(theWindow)), &fontVariable[FS_LIGHT]);

Con_SetFont(fontFixed);

#endif
}

/// @note Part of the Doomsday public API.
Expand Down
19 changes: 7 additions & 12 deletions doomsday/engine/src/render/rend_main.cpp
Expand Up @@ -60,11 +60,6 @@ void Rend_DrawBBox(coord_t const pos[3], coord_t w, coord_t l, coord_t h, float

void Rend_DrawArrow(coord_t const pos[3], float a, float s, float const color3f[3], float alpha);

static void Rend_RenderBoundingBoxes();
static DGLuint constructBBox(DGLuint name, float br);
static uint Rend_BuildBspLeafPlaneGeometry(BspLeaf *leaf, boolean antiClockwise,
coord_t height, rvertex_t **verts, uint *vertsSize);

boolean usingFog = false; // Is the fog in use?
float fogColor[4];
float fieldOfView = 95.0f;
Expand Down Expand Up @@ -131,8 +126,15 @@ byte devSoundOrigins = 0; ///< cvar @c 1= Draw sound origin debug display.
byte devSurfaceVectors = 0;
byte devNoTexFix = 0;

#ifdef __CLIENT__
static void Rend_RenderBoundingBoxes();
static DGLuint constructBBox(DGLuint name, float br);
static uint Rend_BuildBspLeafPlaneGeometry(BspLeaf *leaf, boolean antiClockwise,
coord_t height, rvertex_t **verts, uint *vertsSize);

static BspLeaf *currentBspLeaf; // BSP leaf currently being drawn.
static boolean firstBspLeaf; // No range checking for the first one.
#endif // __CLIENT__

void Rend_Register()
{
Expand Down Expand Up @@ -478,13 +480,6 @@ static inline materialvariantspecification_t const *mapSurfaceMaterialSpec(int w

#ifdef __CLIENT__

int RIT_FirstDynlightIterator(const dynlight_t* dyn, void* paramaters)
{
const dynlight_t** ptr = (const dynlight_t**)paramaters;
*ptr = dyn;
return 1; // Stop iteration.
}

/**
* This doesn't create a rendering primitive but a vissprite! The vissprite
* represents the masked poly and will be rendered during the rendering
Expand Down
2 changes: 2 additions & 0 deletions doomsday/engine/src/ui/b_main.c
Expand Up @@ -190,7 +190,9 @@ void B_Register(void)
*/
static int globalContextFallback(const ddevent_t* ddev)
{
#ifdef __CLIENT__
if(UI_Responder(ddev)) return true; // Eaten.
#endif
if(Con_Responder(ddev)) return true; // Eaten.

if(DD_GameLoaded())
Expand Down
16 changes: 16 additions & 0 deletions doomsday/server/include/server_dummies.h
@@ -1,6 +1,11 @@
/** @file server_dummies.h Dummy functions for the server.
* @ingroup server
*
* Empty dummy functions that replace certain client-only functionality on
* engine-side. Ideally none of these would be needed; each one represents a
* client-only function call that should not be done in common/shared code.
* (There should be no shared code outside libdeng1/2.)
*
* @authors Copyright © 2012 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
Expand All @@ -22,11 +27,18 @@

#include <de/libdeng.h>
#include "map/sector.h"
#include "dd_gl.h"

#ifndef __SERVER__
# error Attempted to include server's header in a non-server build
#endif

DENG_EXTERN_C void ClMobj_EnableLocalActions(struct mobj_s *mo, boolean enable);
DENG_EXTERN_C boolean ClMobj_LocalActionsEnabled(struct mobj_s *mo);
DENG_EXTERN_C struct mobj_s* ClMobj_Find(thid_t id);
DENG_EXTERN_C boolean ClMobj_IsValid(struct mobj_s* mo);
DENG_EXTERN_C struct mobj_s* ClPlayer_ClMobj(int plrNum);

DENG_EXTERN_C void Con_TransitionRegister();
DENG_EXTERN_C void Con_TransitionTicker(timespan_t t);

Expand All @@ -36,9 +48,13 @@ DENG_EXTERN_C void GL_PruneTextureVariantSpecifications();
DENG_EXTERN_C void GL_SetFilter(int f);

DENG_EXTERN_C void R_InitViewWindow(void);
DENG_EXTERN_C void R_InitSvgs(void);
DENG_EXTERN_C void R_ShutdownSvgs(void);

DENG_EXTERN_C void FR_Init(void);
DENG_EXTERN_C void Fonts_Init(void);

DENG_EXTERN_C void Rend_Init(void);
DENG_EXTERN_C void Rend_DecorInit();
DENG_EXTERN_C void Rend_ConsoleInit();
DENG_EXTERN_C void Rend_ConsoleResize(int force);
Expand Down
4 changes: 2 additions & 2 deletions doomsday/server/server.pro
Expand Up @@ -410,7 +410,7 @@ SOURCES += \
$$SRC/src/map/plane.c \
$$SRC/src/map/polyobj.c \
$$SRC/src/map/propertyvalue.cpp \
$$SRC/src/map/r_world.c \
$$SRC/src/map/r_world.cpp \
$$SRC/src/map/sector.c \
$$SRC/src/map/sidedef.c \
$$SRC/src/map/surface.c \
Expand All @@ -427,7 +427,7 @@ SOURCES += \
$$SRC/src/r_util.c \
$$SRC/src/render/r_main.c \
$$SRC/src/render/r_things.cpp \
$$SRC/src/render/rend_main.c \
$$SRC/src/render/rend_main.cpp \
$$SRC/src/resource/animgroups.cpp \
$$SRC/src/resource/colorpalette.c \
$$SRC/src/resource/colorpalettes.cpp \
Expand Down

0 comments on commit 07daf8e

Please sign in to comment.