Skip to content

Commit d514187

Browse files
committed
Remove deprecated stubs
1 parent 8a9ad35 commit d514187

26 files changed

+20
-634
lines changed

core/2d/FastTMXTiledMap.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ class AX_DLL FastTMXTiledMap : public Node
204204
* animations are not enabled by default
205205
*/
206206
void setTileAnimEnabled(bool enabled);
207-
#ifndef AX_CORE_PROFILE
208-
AX_DEPRECATED(2.1) int getLayerNum() const { return getLayerCount(); }
209-
#endif
207+
210208
int getLayerCount() const { return _layerCount; }
211209

212210
std::string_view getResourceFile() const { return _tmxFile; }

core/2d/FontAtlasCache.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,7 @@ FontAtlas* FontAtlasCache::getFontAtlasFNT(std::string_view fontFileName, const
144144

145145
return nullptr;
146146
}
147-
#ifndef AX_CORE_PROFILE
148-
FontAtlas* FontAtlasCache::getFontAtlasFNT(std::string_view fontFileName, const Vec2& imageOffset)
149-
{
150-
return getFontAtlasFNT(fontFileName, Rect(imageOffset.x, imageOffset.y, 0, 0), false);
151-
}
152-
#endif
147+
153148
FontAtlas* FontAtlasCache::getFontAtlasCharMap(std::string_view plistFile)
154149
{
155150
std::string_view atlasName = plistFile;
@@ -260,12 +255,6 @@ void FontAtlasCache::reloadFontAtlasFNT(std::string_view fontFileName, const Rec
260255
_atlasMap.emplace(std::move(atlasName), tempAtlas);
261256
}
262257
}
263-
#ifndef AX_CORE_PROFILE
264-
void FontAtlasCache::reloadFontAtlasFNT(std::string_view fontFileName, const Vec2& imageOffset)
265-
{
266-
reloadFontAtlasFNT(fontFileName, Rect(imageOffset.x, imageOffset.y, 0, 0), false);
267-
}
268-
#endif
269258

270259
void FontAtlasCache::unloadFontAtlasTTF(std::string_view fontFileName)
271260
{

core/2d/FontAtlasCache.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ class AX_DLL FontAtlasCache
5252
static FontAtlas* getFontAtlasFNT(std::string_view fontFileName);
5353
static FontAtlas* getFontAtlasFNT(std::string_view fontFileName, std::string_view subTextureKey);
5454
static FontAtlas* getFontAtlasFNT(std::string_view fontFileName, const Rect& imageRect, bool imageRotated);
55-
#ifndef AX_CORE_PROFILE
56-
AX_DEPRECATED(2.1) static FontAtlas* getFontAtlasFNT(std::string_view fontFileName, const Vec2& imageOffset);
57-
#endif
55+
5856
static FontAtlas* getFontAtlasCharMap(std::string_view charMapFile,
5957
int itemWidth,
6058
int itemHeight,
@@ -74,10 +72,7 @@ class AX_DLL FontAtlasCache
7472
otherwise, it will cause program crash!
7573
*/
7674
static void reloadFontAtlasFNT(std::string_view fontFileName, const Rect& imageRect, bool imageRotated);
77-
#ifndef AX_CORE_PROFILE
78-
AX_DEPRECATED(2.1) static void reloadFontAtlasFNT(std::string_view fontFileName,
79-
const Vec2& imageOffset = Vec2::ZERO);
80-
#endif
75+
8176
/** Unload all texture atlas texture create by special file name.
8277
CAUTION : All component use this font texture should be reset font name, though the file name is same!
8378
otherwise, it will cause program crash!

core/2d/FontFNT.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,7 @@ FontFNT* FontFNT::create(std::string_view fntFilePath)
590590
tempFont->autorelease();
591591
return tempFont;
592592
}
593-
#ifndef AX_CORE_PROFILE
594-
FontFNT* FontFNT::create(std::string_view fntFilePath, const Vec2& imageOffset)
595-
{
596-
return create(fntFilePath, Rect(imageOffset.x, imageOffset.y, 0, 0), false);
597-
}
598-
#endif
593+
599594
FontFNT::FontFNT(BMFontConfiguration* theContfig, const Rect& imageRect, bool imageRotated)
600595
: _configuration(theContfig), _imageRectInPoints(AX_RECT_PIXELS_TO_POINTS(imageRect)), _imageRotated(imageRotated)
601596
{

core/2d/FontFNT.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ class AX_DLL FontFNT : public Font
149149
static FontFNT* create(std::string_view fntFilePath, const Rect& imageRect, bool imageRotated);
150150
static FontFNT* create(std::string_view fntFilePath, std::string_view subTextureKey);
151151
static FontFNT* create(std::string_view fntFilePath);
152-
#ifndef AX_CORE_PROFILE
153-
AX_DEPRECATED(2.1) static FontFNT* create(std::string_view fntFilePath, const Vec2& imageOffset = Vec2::ZERO);
154-
#endif
152+
155153
/** Purges the cached data.
156154
Removes from memory the cached configurations and the atlas name dictionary.
157155
*/

core/2d/Label.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -360,17 +360,6 @@ Label* Label::createWithBMFont(std::string_view bmfontPath,
360360
return nullptr;
361361
}
362362

363-
#ifndef AX_CORE_PROFILE
364-
Label* Label::createWithBMFont(std::string_view bmfontPath,
365-
std::string_view text,
366-
const TextHAlignment& hAlignment,
367-
int maxLineWidth,
368-
const Vec2& imageOffset)
369-
{
370-
return createWithBMFont(bmfontPath, text, hAlignment, maxLineWidth, Rect(imageOffset.x, imageOffset.y, 0, 0),
371-
false);
372-
}
373-
#endif
374363
Label* Label::createWithCharMap(std::string_view plistFile)
375364
{
376365
auto ret = new Label();
@@ -928,12 +917,7 @@ bool Label::setBMFontFilePath(std::string_view bmfontFilePath, std::string_view
928917

929918
return true;
930919
}
931-
#ifndef AX_CORE_PROFILE
932-
bool Label::setBMFontFilePath(std::string_view bmfontFilePath, const Vec2& imageOffset, float fontSize)
933-
{
934-
return setBMFontFilePath(bmfontFilePath, Rect(imageOffset.x, imageOffset.y, 0, 0), false);
935-
}
936-
#endif
920+
937921
void Label::setString(std::string_view text)
938922
{
939923
if (text.compare(_utf8Text))

core/2d/Label.h

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -261,25 +261,6 @@ class AX_DLL Label : public Node, public LabelProtocol, public BlendProtocol
261261
int maxLineWidth,
262262
std::string_view subTextureKey);
263263

264-
/**
265-
* Allocates and initializes a Label, with a bitmap font file.
266-
*
267-
* @param bmfontPath A bitmap font file, it's a FNT format.
268-
* @param text The initial text.
269-
* @param hAlignment Text horizontal alignment.
270-
* @param maxLineWidth The max line width.
271-
* @param imageOffset Offset into larger texture
272-
*
273-
* @return An automatically released Label object.
274-
* @see setBMFontFilePath setMaxLineWidth
275-
*/
276-
#ifndef AX_CORE_PROFILE
277-
AX_DEPRECATED(2.1) static Label* createWithBMFont(std::string_view bmfontPath,
278-
std::string_view text,
279-
const TextHAlignment& hAlignment,
280-
int maxLineWidth,
281-
const Vec2& imageOffset);
282-
#endif
283264
/**
284265
* Allocates and initializes a Label, with char map configuration.
285266
*
@@ -342,12 +323,7 @@ class AX_DLL Label : public Node, public LabelProtocol, public BlendProtocol
342323

343324
/** Sets a new bitmap font to Label */
344325
virtual bool setBMFontFilePath(std::string_view bmfontFilePath, std::string_view subTextureKey, float fontSize = 0);
345-
#ifndef AX_CORE_PROFILE
346-
/** Sets a new bitmap font to Label */
347-
AX_DEPRECATED(2.1) virtual bool setBMFontFilePath(std::string_view bmfontFilePath,
348-
const Vec2& imageOffset,
349-
float fontSize = 0);
350-
#endif
326+
351327
/** Returns the bitmap font used by the Label.*/
352328
std::string_view getBMFontFilePath() const { return _bmFontPath; }
353329

@@ -795,10 +771,7 @@ class AX_DLL Label : public Node, public LabelProtocol, public BlendProtocol
795771

796772
virtual void updateShaderProgram();
797773
virtual void updateFontScale();
798-
#ifndef AX_CORE_PROFILE
799-
/* DEPRECATED: use updateFontScale instead */
800-
AX_DEPRECATED(2.1) virtual void updateBMFontScale() { updateFontScale(); }
801-
#endif
774+
802775
void scaleFontSize(float fontSize);
803776
bool setTTFConfigInternal(const TTFConfig& ttfConfig);
804777
bool updateTTFConfigInternal();

core/axmol.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ THE SOFTWARE.
3838
#include "base/Config.h"
3939

4040
// base
41-
#ifndef AX_CORE_PROFILE
42-
# include "base/AsyncTaskPool.h"
43-
#endif
4441
#include "base/AutoreleasePool.h"
4542
#include "base/Configuration.h"
4643
#include "base/Logging.h"

core/base/Director.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ THE SOFTWARE.
5757
#include "base/Logging.h"
5858
#include "base/AutoreleasePool.h"
5959
#include "base/Configuration.h"
60-
#ifndef AX_CORE_PROFILE
61-
# include "base/AsyncTaskPool.h"
62-
#endif
6360
#include "base/ObjectFactory.h"
6461
#include "platform/Application.h"
6562
#if defined(AX_ENABLE_AUDIO)
@@ -1059,9 +1056,7 @@ void Director::reset()
10591056
AnimationCache::destroyInstance();
10601057
SpriteFrameCache::destroyInstance();
10611058
FileUtils::destroyInstance();
1062-
#ifndef AX_CORE_PROFILE
1063-
AsyncTaskPool::destroyInstance();
1064-
#endif
1059+
10651060
backend::ProgramStateRegistry::destroyInstance();
10661061
backend::ProgramManager::destroyInstance();
10671062

core/base/Logging.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,4 @@ AX_DLL void writeLog(LogItem& item, const char* tag)
230230
# endif
231231
#endif
232232
}
233-
#ifndef AX_CORE_PROFILE
234-
AX_API void print(const char* format, ...)
235-
{
236-
va_list args;
237-
238-
va_start(args, format);
239-
auto message = StringUtils::vformat(format, args);
240-
va_end(args);
241-
242-
if (!message.empty())
243-
outputLog(LogItem::vformat(FMT_COMPILE("{}{}\n"), preprocessLog(LogItem{LogLevel::Silent}), message),
244-
"axmol debug info");
245-
}
246-
#endif
247233
}

core/base/Logging.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,4 @@ inline void printLogT(_FmtType&& fmt, LogItem& item, _Types&&... args)
159159
#define AXLOGE(fmtOrMsg, ...) AXLOG_WITH_LEVEL(ax::LogLevel::Error, fmtOrMsg, ##__VA_ARGS__)
160160

161161
#define AXLOGT AXLOGV
162-
163-
#ifndef AX_CORE_PROFILE
164-
/**
165-
@brief Output Debug message.
166-
*/
167-
/* AX_DEPRECATED(2.1)*/ AX_API void print(const char* format, ...) AX_FORMAT_PRINTF(1, 2); // use AXLOGD instead
168-
#endif
169162
}

core/base/Scheduler.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,7 @@ class AX_DLL Scheduler : public Object
471471
@js NA
472472
*/
473473
void runOnAxmolThread(std::function<void()> action);
474-
#ifndef AX_CORE_PROFILE
475-
AX_DEPRECATED(2.1) void performFunctionInCocosThread(std::function<void()> action)
476-
{
477-
runOnAxmolThread(std::move(action));
478-
}
479-
#endif
474+
480475
/**
481476
* Remove all pending functions queued to be performed with Scheduler::runOnAxmolThread
482477
* Functions unscheduled in this manner will not be executed
@@ -485,9 +480,6 @@ class AX_DLL Scheduler : public Object
485480
* @js NA
486481
*/
487482
void removeAllPendingActions();
488-
#ifndef AX_CORE_PROFILE
489-
AX_DEPRECATED(2.1) void removeAllFunctionsToBePerformedInCocosThread() { removeAllPendingActions(); }
490-
#endif
491483
protected:
492484
/** Schedules the 'callback' function for a given target with a given priority.
493485
The 'callback' selector will be called every frame.

core/cocos2d.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ namespace cocos2d = ax;
6363
#define CCASSERT AXASSERT
6464
#define CC_ASSERT AX_ASSERT
6565
#define CC_CONSTRUCTOR_ACCESS public
66-
#ifndef AX_CORE_PROFILE
67-
# define CCLOG AXLOG
68-
# define CCLOGINFO AXLOGINFO
69-
# define CCLOGWARN AXLOGWARN
70-
# define CCLOGERROR AXLOGERROR
71-
#endif
7266

7367
#define CC_SAFE_RETAIN AX_SAFE_RETAIN
7468

0 commit comments

Comments
 (0)