Skip to content

Commit

Permalink
API: Dropped old/obsolete W API
Browse files Browse the repository at this point in the history
The specialized lump index functionality of this old API can now be
accessed directly via de::LumpIndex's public API. The central lump
index can be accessed via the F API's F_LumpIndex().

libcommon provides a convenient CentralLumpIndex() accessor function.
  • Loading branch information
danij-deng committed Jun 28, 2014
1 parent adcfd4d commit 0d0e8c4
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 374 deletions.
2 changes: 1 addition & 1 deletion doomsday/api/api_filesys.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ DENG_API_TYPEDEF(F)
/**
* Returns a pointer to the global WAD lump index.
*/
void* (*LumpIndex)();
void const* (*LumpIndex)();
}
DENG_API_T(F);

Expand Down
121 changes: 0 additions & 121 deletions doomsday/api/api_wad.h

This file was deleted.

8 changes: 2 additions & 6 deletions doomsday/api/apis.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @file api/apis.h Doomsday's public API mechanism.
/** @file apis.h Doomsday's public API mechanism.
* @ingroup base
*
* @authors Copyright © 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
Expand Down Expand Up @@ -142,11 +142,7 @@ enum {

DE_API_URI_v1 = 2300, // 1.10
DE_API_URI_v2 = 2301, // 1.14
DE_API_URI = DE_API_URI_v2,

DE_API_WAD_v1 = 2400, // 1.10
DE_API_WAD_v2 = 2401, // 1.14
DE_API_WAD = DE_API_WAD_v2
DE_API_URI = DE_API_URI_v2
};

/**
Expand Down
3 changes: 1 addition & 2 deletions doomsday/api/dd_share.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include "dd_version.h"
#include "dd_types.h"
#include "def_share.h"
#include "api_wad.h"
#include "api_thinker.h"
#include "api_map.h"
#include "api_gl.h"
Expand Down Expand Up @@ -152,7 +151,7 @@ enum {
DD_PLAYBACK,
DD_NUMSOUNDS,
DD_NUMMUSIC,
DD_NUMLUMPS,
DD_UNUSED12, // DD_NUMLUMPS
DD_CLIENT_PAUSED,
DD_WEAPON_OFFSET_SCALE_Y, ///< 1000x
DD_GAME_DATA_FORMAT,
Expand Down
2 changes: 0 additions & 2 deletions doomsday/client/client.pro
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ DENG_API_HEADERS = \
$$DENG_API_DIR/api_svg.h \
$$DENG_API_DIR/api_thinker.h \
$$DENG_API_DIR/api_uri.h \
$$DENG_API_DIR/api_wad.h \
$$DENG_API_DIR/dd_share.h \
$$DENG_API_DIR/dd_types.h \
$$DENG_API_DIR/dd_version.h \
Expand Down Expand Up @@ -541,7 +540,6 @@ SOURCES += \
src/dd_main.cpp \
src/dd_pinit.cpp \
src/dd_plugin.cpp \
src/dd_wad.cpp \
src/def_main.cpp \
src/edit_bias.cpp \
src/face.cpp \
Expand Down
3 changes: 2 additions & 1 deletion doomsday/client/src/api_filesys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ DENG_DECLARE_API(F) =
F_PrettyPath,
M_ReadFile,
M_ReadFileIntoString,
M_WriteFile
M_WriteFile,
F_LumpIndex
};
8 changes: 0 additions & 8 deletions doomsday/client/src/dd_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2473,9 +2473,6 @@ int DD_GetInteger(int ddvalue)
return vrCfg().mode() == VRConfig::OculusRift && vrCfg().oculusRift().isReady();
#endif

case DD_NUMLUMPS:
return App_FileSystem().lumpCount();

case DD_MAP_MUSIC:
if(App_WorldSystem().hasMap())
{
Expand Down Expand Up @@ -2594,11 +2591,6 @@ void *DD_GetVariable(int ddvalue)
fracTic = gameTime * TICSPERSEC;
return &fracTic; }

case DD_NUMLUMPS: {
static int count;
count = App_FileSystem().lumpCount();
return &count; }

default: break;
}

Expand Down
Loading

0 comments on commit 0d0e8c4

Please sign in to comment.