Skip to content

Commit

Permalink
extern declarations made available
Browse files Browse the repository at this point in the history
  • Loading branch information
kortemik committed Apr 6, 2015
1 parent 1d202cd commit 60ff0df
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 28 deletions.
40 changes: 21 additions & 19 deletions neo/d3xp/Game_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ class idUserInterface;
class idWeapon;
class idMenuHandler_Shell;

extern idRenderWorld* gameRenderWorld;
extern idSoundWorld* gameSoundWorld;
extern idCVar g_demoMode;
extern idCVar net_ucmdRate;
extern idCVar net_allowCheats;
extern idRenderWorld *gameRenderWorld;
extern idSoundWorld *gameSoundWorld;

// classes used by idGameLocal
class idEntity;
Expand Down Expand Up @@ -176,11 +179,10 @@ typedef struct
int team;
} spawnSpot_t;

enum
{
PORTALSKY_STANDARD = 0, // classic portalsky
PORTALSKY_GLOBAL = 1, // always following portal sky
PORTALSKY_LOCAL = 2, // following portal sky from a spot
enum {
PORTALSKY_STANDARD = 0, // classic portalsky
PORTALSKY_GLOBAL = 1, // always following portal sky
PORTALSKY_LOCAL = 2, // following portal sky from a spot
};

//============================================================================
Expand Down Expand Up @@ -378,21 +380,21 @@ class idGameLocal : public idGame

idEntityPtr<idEntity> portalSkyEnt;
bool portalSkyActive;
bool globalPortalSky;
int portalSkyScale;
int currentPortalSkyType; //0 = classic, 1 = global, 2 = local
idVec3 portalSkyOrigin;
idVec3 portalSkyGlobalOrigin;
idVec3 playerOldEyePos;

bool globalPortalSky;
int portalSkyScale;
int currentPortalSkyType; //0 = classic, 1 = global, 2 = local
idVec3 portalSkyOrigin;
idVec3 portalSkyGlobalOrigin;
idVec3 playerOldEyePos;

void SetPortalSkyEnt( idEntity* ent );
bool IsPortalSkyActive();
bool CheckGlobalPortalSky();
void SetGlobalPortalSky( const char* name );
void SetCurrentPortalSkyType( int type ); // 0 = classic, 1 = global, 2 = local
int GetCurrentPortalSkyType(); //0 = classic, 1 = global, 2 = local

bool CheckGlobalPortalSky();
void SetGlobalPortalSky(const char *name);
void SetCurrentPortalSkyType(int type); // 0 = classic, 1 = global, 2 = local
int GetCurrentPortalSkyType(); //0 = classic, 1 = global, 2 = local

timeState_t fast;
timeState_t slow;
Expand Down
1 change: 1 addition & 0 deletions neo/framework/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ struct lobbyConnectInfo_t;
*/

extern idCVar com_engineHz;
extern idCVar com_fixedTic;
extern float com_engineHz_latched;
extern int64 com_engineHz_numerator;
extern int64 com_engineHz_denominator;
Expand Down
12 changes: 7 additions & 5 deletions neo/framework/common_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you have questions concerning this license or the applicable additional terms
===========================================================================
*/

#pragma hdrstop


#include <cstddef>
#include <algorithm>
Expand Down Expand Up @@ -59,15 +59,17 @@ If you have questions concerning this license or the applicable additional terms
#include "Common_local.h"
#include "sys/sys_savegame.h"

namespace BFG {

struct emptyCommand_t;
#pragma hdrstop

#ifdef _WIN32
// KORTEMIK: namespaces collide
// macro collision
#undef min
#endif

namespace BFG {

struct emptyCommand_t;

/*
New for tech4x:
Expand Down
1 change: 0 additions & 1 deletion neo/idlib/ParallelJobList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ void idParallelJobList_Threads::Submit( idParallelJobList_Threads* waitForJobLis
if( threaded )
{
// hand over to the manager
void SubmitJobList( idParallelJobList_Threads * jobList, int parallelism );
SubmitJobList( this, parallelism );
}
else
Expand Down
5 changes: 4 additions & 1 deletion neo/idlib/ParallelJobList.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ If you have questions concerning this license or the applicable additional terms

namespace BFG {

struct CellSpursJob128;
class idParallelJobList_Threads;
class idColor;
struct CellSpursJob128;

typedef void ( * jobRun_t )( void* );

void SubmitJobList(idParallelJobList_Threads* jobList, int parallelism);

enum jobSyncType_t
{
SYNC_NONE,
Expand Down
2 changes: 2 additions & 0 deletions neo/renderer/GraphicsAPIWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ bool GL_CheckErrors_( const char* filename, int line );
wrapperStats_t GL_GetCurrentStats();
void GL_ClearStats();

const void GL_BlockingSwapBuffers();

} // namespace BFG

#endif // !__GRAPHICSAPIWRAPPER_H__
1 change: 0 additions & 1 deletion neo/renderer/RenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ void idRenderSystemLocal::SwapCommandBuffers_FinishRendering(

// wait for our fence to hit, which means the swap has actually happened
// We must do this before clearing any resources the GPU may be using
void GL_BlockingSwapBuffers();
GL_BlockingSwapBuffers();
}

Expand Down
3 changes: 3 additions & 0 deletions neo/renderer/RenderSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ If you have questions concerning this license or the applicable additional terms

namespace BFG {

extern idCVar stereoRender_warp;
extern idCVar stereoRender_swapEyes;

/*
===============================================================================
Expand Down
2 changes: 2 additions & 0 deletions neo/sound/sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ If you have questions concerning this license or the applicable additional terms

namespace BFG {

extern idCVar timescale;

/*
===============================================================================
Expand Down
2 changes: 2 additions & 0 deletions neo/swf/SWF_ScriptObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ namespace BFG {
class idSWFSpriteInstance;
class idSWFTextInstance;

extern idCVar swf_debug;

/*
========================
This is the base class for script variables which are implemented in code
Expand Down
4 changes: 4 additions & 0 deletions neo/sys/PacketProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ If you have questions concerning this license or the applicable additional terms

namespace BFG {

class idCVar;

extern idCVar net_verboseReliable;

/*
================================================
idPacketProcessor
Expand Down
2 changes: 2 additions & 0 deletions neo/sys/Snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ If you have questions concerning this license or the applicable additional terms
namespace BFG {

extern idCVar net_verboseSnapshot;
extern idCVar net_ssTemplateDebug;

#define NET_VERBOSESNAPSHOT_PRINT if ( net_verboseSnapshot.GetInteger() > 0 ) idLib::Printf
#define NET_VERBOSESNAPSHOT_PRINT_LEVEL( X, Y ) if ( net_verboseSnapshot.GetInteger() >= ( X ) ) idLib::Printf( "%s", Y )

Expand Down
7 changes: 7 additions & 0 deletions neo/sys/sys_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ If you have questions concerning this license or the applicable additional terms

namespace BFG {

extern idCVar net_maxSearchResultsToTry;
extern idCVar net_peer_throttle_bps_host_threshold;
extern idCVar net_peer_throttle_bps_peer_threshold_pct;
extern idCVar net_useGameStateLobby;
extern idCVar net_bw_challenge_enable;
extern idCVar si_splitscreen;

struct lobbyConnectInfo_t;

typedef uint8 peerMask_t;
Expand Down
2 changes: 2 additions & 0 deletions neo/sys/win32/win_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ LONG WINAPI MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );

void Conbuf_AppendText( const char* msg );

void GLW_WM_CREATE(HWND hWnd);

struct Win32Vars_t
{
HWND hWnd;
Expand Down
1 change: 0 additions & 1 deletion neo/sys/win32/win_wndproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ LONG WINAPI MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
}

// do the OpenGL setup
void GLW_WM_CREATE( HWND hWnd );
GLW_WM_CREATE( hWnd );

break;
Expand Down

0 comments on commit 60ff0df

Please sign in to comment.