mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
Merge pull request #4223 from minggo/v3.6_merge_v3.5.0
V3.6 merge v3.5.0
This commit is contained in:
+30
@@ -229,3 +229,33 @@ jobs:
|
||||
cmake --build . --config Debug -- -jobs $NUM_OF_CORES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
|
||||
fi
|
||||
echo "Compile iOS Done!"
|
||||
|
||||
compile_wgpu_mac:
|
||||
name: "Emscripten"
|
||||
runs-on: macos-latest
|
||||
if: contains( github.event.head_commit.message, 'WGPU_CI_ON' )
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Download external libraries
|
||||
shell: bash
|
||||
run: |
|
||||
EXT_VERSION=`grep version external/config.json |awk -F'"' '{print $4}'`
|
||||
rm external/config.json
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos-creator/engine-native-external external
|
||||
- name: Setup Emscripten
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git ../emsdk
|
||||
cd ../emsdk
|
||||
./emsdk install latest
|
||||
./emsdk activate latest
|
||||
source ./emsdk_env.sh
|
||||
emcc -v
|
||||
- name: Compile
|
||||
env:
|
||||
COCOS_ENGINE_DEV: 1
|
||||
run: |
|
||||
COCOS2DX_ROOT=$GITHUB_WORKSPACE
|
||||
cd $COCOS2DX_ROOT/cocos/renderer/gfx-wgpu
|
||||
$COCOS2DX_ROOT/../emsdk/upstream/emscripten/emcmake cmake .
|
||||
$COCOS2DX_ROOT/../emsdk/upstream/emscripten/emmake make
|
||||
echo "Compile WGPU by ems on MacOS Done!"
|
||||
|
||||
Vendored
-1
@@ -13,7 +13,6 @@
|
||||
"external/sources",
|
||||
"external/sources/khronos",
|
||||
"external/win32/include",
|
||||
"external/win32/include/glslang",
|
||||
"external/win32/include/v8"
|
||||
],
|
||||
"compileCommands": "${workspaceFolder}/compile_commands.json"
|
||||
|
||||
@@ -2264,9 +2264,9 @@ endif()
|
||||
|
||||
if(ANDROID)
|
||||
cocos_source_files(
|
||||
cocos/bindings/manual/jsb_platform_android.cpp
|
||||
cocos/bindings/manual/JavaScriptJavaBridge.cpp
|
||||
cocos/bindings/manual/JavaScriptJavaBridge.h
|
||||
cocos/bindings/manual/jsb_platform_android.cpp
|
||||
cocos/bindings/manual/JavaScriptJavaBridge.cpp
|
||||
cocos/bindings/manual/JavaScriptJavaBridge.h
|
||||
)
|
||||
elseif(OHOS)
|
||||
cocos_source_files(
|
||||
@@ -2281,6 +2281,8 @@ elseif(APPLE)
|
||||
cocos/bindings/manual/JavaScriptObjCBridge.mm
|
||||
cocos/platform/apple/JsbBridge.h
|
||||
cocos/platform/apple/JsbBridge.mm
|
||||
cocos/platform/apple/JsbBridgeWrapper.h
|
||||
cocos/platform/apple/JsbBridgeWrapper.mm
|
||||
)
|
||||
elseif(WIN32)
|
||||
cocos_source_files(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
@@ -10,10 +10,10 @@
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -21,7 +21,7 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -76,6 +76,7 @@ private:
|
||||
std::vector<IntrusivePtr<gfx::Buffer>> _buffers;
|
||||
std::vector<JointInfo> _joints;
|
||||
std::vector<std::array<float, pipeline::UBOSkinning::COUNT> *> _dataArray;
|
||||
|
||||
CC_DISALLOW_COPY_MOVE_ASSIGN(SkinningModel);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
namespace cc {
|
||||
// static
|
||||
ApplicationManager* ApplicationManager::getInstance() {
|
||||
ApplicationManager *ApplicationManager::getInstance() {
|
||||
static ApplicationManager mgr;
|
||||
return &mgr;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
namespace cc {
|
||||
class ApplicationManager {
|
||||
public:
|
||||
static ApplicationManager* getInstance();
|
||||
static ApplicationManager *getInstance();
|
||||
|
||||
using ApplicationPtr = std::shared_ptr<BaseApplication>;
|
||||
|
||||
@@ -88,6 +88,6 @@ private:
|
||||
} while (0)
|
||||
|
||||
#define CC_APPLICATION_MAIN(className) \
|
||||
int cocos_main(int argc, const char** argv) { \
|
||||
int cocos_main(int argc, const char **argv) { \
|
||||
CC_START_APPLICATION(className); \
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
* @brief Application main business logic.
|
||||
*/
|
||||
virtual int32_t run(int argc,
|
||||
const char** argv) = 0;
|
||||
const char **argv) = 0;
|
||||
/**
|
||||
* @brief Pause the application.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -60,7 +60,7 @@ int CocosApplication::init() {
|
||||
jsb_init_file_operation_delegate();
|
||||
|
||||
se->setExceptionCallback(
|
||||
std::bind(&CocosApplication::handleException, this, // NOLINT(modernize-avoid-bind)
|
||||
std::bind(&CocosApplication::handleException, this, // NOLINT(modernize-avoid-bind)
|
||||
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
|
||||
jsb_register_all_modules();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
/**
|
||||
* @brief Application main business logic.
|
||||
*/
|
||||
int32_t run(int argc, const char** argv) override;
|
||||
int32_t run(int argc, const char **argv) override;
|
||||
/**
|
||||
* @brief Pause the application.
|
||||
*/
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
* @param h: Window height
|
||||
* @param flags: Window flag
|
||||
*/
|
||||
virtual void createWindow(const char* title,
|
||||
virtual void createWindow(const char *title,
|
||||
int32_t x, int32_t y, int32_t w,
|
||||
int32_t h, int32_t flags);
|
||||
/**
|
||||
@@ -96,25 +96,25 @@ public:
|
||||
* @param port:Server port.
|
||||
* @param isWaitForConnect:Is Wait for connect.
|
||||
*/
|
||||
virtual void setJsDebugIpAndPort(const std::string& serverAddr, uint32_t port, bool isWaitForConnect);
|
||||
virtual void setJsDebugIpAndPort(const std::string &serverAddr, uint32_t port, bool isWaitForConnect);
|
||||
/**
|
||||
* @brief Run the js code file
|
||||
* @param filePath:Js file path.
|
||||
*/
|
||||
virtual void runJsScript(const std::string& filePath);
|
||||
virtual void runJsScript(const std::string &filePath);
|
||||
/**
|
||||
* @brief Js exception handling
|
||||
* @param location,Exception location
|
||||
* @param message,Exception message
|
||||
* @param stack,Exception stack
|
||||
*/
|
||||
virtual void handleException(const char* location, const char* message, const char* stack);
|
||||
virtual void setXXTeaKey(const std::string& key);
|
||||
virtual void handleException(const char *location, const char *message, const char *stack);
|
||||
virtual void setXXTeaKey(const std::string &key);
|
||||
|
||||
private:
|
||||
void handleAppEvent(const OSEvent& ev);
|
||||
void handleAppEvent(const OSEvent &ev);
|
||||
|
||||
ISystemWindow* _systemWidow{nullptr};
|
||||
ISystemWindow * _systemWidow{nullptr};
|
||||
BaseEngine::Ptr _engine{nullptr};
|
||||
};
|
||||
} // namespace cc
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -88,8 +88,8 @@ class AudioEngine::AudioEngineThreadPool {
|
||||
public:
|
||||
explicit AudioEngineThreadPool(int threads = 4) {
|
||||
for (int index = 0; index < threads; ++index) {
|
||||
_workers.emplace_back(std::thread([this](){
|
||||
threadFunc();
|
||||
_workers.emplace_back(std::thread([this]() {
|
||||
threadFunc();
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -204,7 +204,7 @@ int AudioEngine::play2d(const std::string &filePath, bool loop, float volume, co
|
||||
break;
|
||||
}
|
||||
|
||||
auto* profileHelper = sDefaultProfileHelper;
|
||||
auto *profileHelper = sDefaultProfileHelper;
|
||||
if (profile && profile != &profileHelper->profile) {
|
||||
CC_ASSERT(!profile->name.empty());
|
||||
profileHelper = &sAudioPathProfileHelperMap[profile->name];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
#import <OpenAL/al.h>
|
||||
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/Macros.h"
|
||||
#include "audio/apple/AudioMacros.h"
|
||||
#include "base/Macros.h"
|
||||
|
||||
namespace cc {
|
||||
class AudioEngineImpl;
|
||||
@@ -64,9 +64,9 @@ protected:
|
||||
void invokingLoadCallbacks();
|
||||
|
||||
//pcm data related stuff
|
||||
ALenum _format;
|
||||
ALsizei _sampleRate;
|
||||
float _duration;
|
||||
ALenum _format;
|
||||
ALsizei _sampleRate;
|
||||
float _duration;
|
||||
uint32_t _totalFrames;
|
||||
uint32_t _framesRead;
|
||||
|
||||
@@ -74,16 +74,16 @@ protected:
|
||||
* Cache pcm data when sizeInBytes less than PCMDATA_CACHEMAXSIZE
|
||||
*/
|
||||
ALuint _alBufferId;
|
||||
char *_pcmData;
|
||||
char * _pcmData;
|
||||
|
||||
/*Queue buffer related stuff
|
||||
* Streaming in openal when sizeInBytes greater then PCMDATA_CACHEMAXSIZE
|
||||
*/
|
||||
char *_queBuffers[QUEUEBUFFER_NUM];
|
||||
ALsizei _queBufferSize[QUEUEBUFFER_NUM];
|
||||
char * _queBuffers[QUEUEBUFFER_NUM];
|
||||
ALsizei _queBufferSize[QUEUEBUFFER_NUM];
|
||||
uint32_t _queBufferFrames;
|
||||
|
||||
std::mutex _playCallbackMutex;
|
||||
std::mutex _playCallbackMutex;
|
||||
std::vector<std::function<void()>> _playCallbacks;
|
||||
|
||||
// loadCallbacks doesn't need mutex since it's invoked only in Cocos thread.
|
||||
@@ -94,10 +94,10 @@ protected:
|
||||
State _state;
|
||||
|
||||
std::shared_ptr<bool> _isDestroyed;
|
||||
std::string _fileFullPath;
|
||||
unsigned int _id;
|
||||
bool _isLoadingFinished;
|
||||
bool _isSkipReadDataTask;
|
||||
std::string _fileFullPath;
|
||||
unsigned int _id;
|
||||
bool _isLoadingFinished;
|
||||
bool _isSkipReadDataTask;
|
||||
|
||||
friend class AudioEngineImpl;
|
||||
friend class AudioPlayer;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#import <AudioToolbox/ExtendedAudioFile.h>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace cc {
|
||||
|
||||
@@ -107,12 +107,12 @@ public:
|
||||
uint32_t getChannelCount() const;
|
||||
|
||||
private:
|
||||
bool _isOpened;
|
||||
bool _isOpened;
|
||||
ExtAudioFileRef _extRef;
|
||||
uint32_t _totalFrames;
|
||||
uint32_t _bytesPerFrame;
|
||||
uint32_t _sampleRate;
|
||||
uint32_t _channelCount;
|
||||
uint32_t _totalFrames;
|
||||
uint32_t _bytesPerFrame;
|
||||
uint32_t _sampleRate;
|
||||
uint32_t _channelCount;
|
||||
|
||||
AudioStreamBasicDescription _outputFormat;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base/Macros.h"
|
||||
#include "audio/apple/AudioMacros.h"
|
||||
#include "base/Macros.h"
|
||||
|
||||
#include <OpenAL/al.h>
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <OpenAL/al.h>
|
||||
|
||||
namespace cc {
|
||||
class AudioCache;
|
||||
@@ -47,9 +47,9 @@ public:
|
||||
void destroy();
|
||||
|
||||
//queue buffer related stuff
|
||||
bool setTime(float time);
|
||||
bool setTime(float time);
|
||||
float getTime() { return _currTime; }
|
||||
bool setLoop(bool loop);
|
||||
bool setLoop(bool loop);
|
||||
|
||||
protected:
|
||||
void setCache(AudioCache *cache);
|
||||
@@ -59,25 +59,25 @@ protected:
|
||||
|
||||
AudioCache *_audioCache;
|
||||
|
||||
float _volume;
|
||||
bool _loop;
|
||||
float _volume;
|
||||
bool _loop;
|
||||
std::function<void(int, const std::string &)> _finishCallbak;
|
||||
|
||||
bool _isDestroyed;
|
||||
bool _removeByAudioEngine;
|
||||
bool _ready;
|
||||
bool _isDestroyed;
|
||||
bool _removeByAudioEngine;
|
||||
bool _ready;
|
||||
ALuint _alSource;
|
||||
|
||||
//play by circular buffer
|
||||
float _currTime;
|
||||
bool _streamingSource;
|
||||
ALuint _bufferIds[QUEUEBUFFER_NUM];
|
||||
std::thread *_rotateBufferThread;
|
||||
float _currTime;
|
||||
bool _streamingSource;
|
||||
ALuint _bufferIds[QUEUEBUFFER_NUM];
|
||||
std::thread * _rotateBufferThread;
|
||||
std::condition_variable _sleepCondition;
|
||||
std::mutex _sleepMutex;
|
||||
bool _timeDirty;
|
||||
bool _isRotateThreadExited;
|
||||
std::atomic_bool _needWakeupRotateThread;
|
||||
std::mutex _sleepMutex;
|
||||
bool _timeDirty;
|
||||
bool _isRotateThreadExited;
|
||||
std::atomic_bool _needWakeupRotateThread;
|
||||
|
||||
std::mutex _play2dMutex;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -72,9 +72,9 @@ protected:
|
||||
void invokingLoadCallbacks();
|
||||
|
||||
//pcm data related stuff
|
||||
ALenum _format;
|
||||
ALsizei _sampleRate;
|
||||
float _duration;
|
||||
ALenum _format;
|
||||
ALsizei _sampleRate;
|
||||
float _duration;
|
||||
uint32_t _totalFrames;
|
||||
uint32_t _framesRead;
|
||||
|
||||
@@ -82,16 +82,16 @@ protected:
|
||||
* Cache pcm data when sizeInBytes less than PCMDATA_CACHEMAXSIZE
|
||||
*/
|
||||
ALuint _alBufferId;
|
||||
char *_pcmData;
|
||||
char * _pcmData;
|
||||
|
||||
/*Queue buffer related stuff
|
||||
* Streaming in OpenAL when sizeInBytes greater then PCMDATA_CACHEMAXSIZE
|
||||
*/
|
||||
char *_queBuffers[QUEUEBUFFER_NUM];
|
||||
ALsizei _queBufferSize[QUEUEBUFFER_NUM];
|
||||
char * _queBuffers[QUEUEBUFFER_NUM];
|
||||
ALsizei _queBufferSize[QUEUEBUFFER_NUM];
|
||||
uint32_t _queBufferFrames;
|
||||
|
||||
std::mutex _playCallbackMutex;
|
||||
std::mutex _playCallbackMutex;
|
||||
std::vector<std::function<void()>> _playCallbacks;
|
||||
|
||||
// loadCallbacks doesn't need mutex since it's invoked only in Cocos thread.
|
||||
@@ -102,10 +102,10 @@ protected:
|
||||
State _state;
|
||||
|
||||
std::shared_ptr<bool> _isDestroyed;
|
||||
std::string _fileFullPath;
|
||||
unsigned int _id;
|
||||
bool _isLoadingFinished;
|
||||
bool _isSkipReadDataTask;
|
||||
std::string _fileFullPath;
|
||||
unsigned int _id;
|
||||
bool _isLoadingFinished;
|
||||
bool _isSkipReadDataTask;
|
||||
|
||||
friend class AudioEngineImpl;
|
||||
friend class AudioPlayer;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -22,11 +22,12 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "audio/oalsoft/AudioDecoder.h"
|
||||
#include <string.h>
|
||||
#include "audio/oalsoft/AudioMacros.h"
|
||||
#include "platform/FileUtils.h"
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LOG_TAG
|
||||
#undef LOG_TAG
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -32,10 +32,10 @@ class AudioDecoder;
|
||||
|
||||
class AudioDecoderManager {
|
||||
public:
|
||||
static bool init();
|
||||
static void destroy();
|
||||
static bool init();
|
||||
static void destroy();
|
||||
static AudioDecoder *createDecoder(const char *path);
|
||||
static void destroyDecoder(AudioDecoder *decoder);
|
||||
static void destroyDecoder(AudioDecoder *decoder);
|
||||
};
|
||||
|
||||
} // namespace cc
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "audio/oalsoft/AudioDecoderMp3.h"
|
||||
#include "audio/oalsoft/AudioMacros.h"
|
||||
#include "platform/FileUtils.h"
|
||||
@@ -30,9 +31,9 @@
|
||||
#if CC_PLATFORM == CC_PLATFORM_WINDOWS || CC_PLATFORM == CC_PLATFORM_LINUX || CC_PLATFORM == CC_PLATFORM_QNX
|
||||
#include "mpg123/mpg123.h"
|
||||
#elif CC_PLATFORM == CC_PLATFORM_OHOS
|
||||
#include <unistd.h>
|
||||
#include "cocos/platform/ohos/FileUtils-ohos.h"
|
||||
#include "mpg123.h"
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "audio/oalsoft/AudioDecoderOgg.h"
|
||||
#include "audio/oalsoft/AudioMacros.h"
|
||||
#include "platform/FileUtils.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#define LOG_TAG "AudioEngine-OALSOFT"
|
||||
|
||||
#include "audio/oalsoft/AudioEngine-soft.h"
|
||||
@@ -40,10 +41,10 @@
|
||||
#include "AL/alc.h"
|
||||
#include "AL/alext.h"
|
||||
#endif
|
||||
#include "application/ApplicationManager.h"
|
||||
#include "audio/include/AudioEngine.h"
|
||||
#include "audio/oalsoft/AudioDecoderManager.h"
|
||||
#include "base/Scheduler.h"
|
||||
#include "application/ApplicationManager.h"
|
||||
#include "platform/FileUtils.h"
|
||||
|
||||
#if CC_PLATFORM == CC_PLATFORM_WINDOWS
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
break; \
|
||||
}
|
||||
|
||||
#define BREAK_IF_ERR_LOG(condition, fmt, ...) \
|
||||
if (!!(condition)) { \
|
||||
#define BREAK_IF_ERR_LOG(condition, fmt, ...) \
|
||||
if (!!(condition)) { \
|
||||
CC_LOG_DEBUG("(" QUOTEME(condition) ") failed, message: " fmt, ##__VA_ARGS__); \
|
||||
break; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
#include "base/Log.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
using namespace cc; //NOLINT
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -55,9 +55,9 @@ public:
|
||||
void destroy();
|
||||
|
||||
//queue buffer related stuff
|
||||
bool setTime(float time);
|
||||
bool setTime(float time);
|
||||
float getTime() { return _currTime; }
|
||||
bool setLoop(bool loop);
|
||||
bool setLoop(bool loop);
|
||||
|
||||
protected:
|
||||
void setCache(AudioCache *cache);
|
||||
@@ -66,24 +66,24 @@ protected:
|
||||
|
||||
AudioCache *_audioCache;
|
||||
|
||||
float _volume;
|
||||
bool _loop;
|
||||
float _volume;
|
||||
bool _loop;
|
||||
std::function<void(int, const std::string &)> _finishCallbak;
|
||||
|
||||
bool _isDestroyed;
|
||||
bool _removeByAudioEngine;
|
||||
bool _ready;
|
||||
bool _isDestroyed;
|
||||
bool _removeByAudioEngine;
|
||||
bool _ready;
|
||||
ALuint _alSource;
|
||||
|
||||
//play by circular buffer
|
||||
float _currTime;
|
||||
bool _streamingSource;
|
||||
ALuint _bufferIds[3];
|
||||
std::thread *_rotateBufferThread;
|
||||
float _currTime;
|
||||
bool _streamingSource;
|
||||
ALuint _bufferIds[3];
|
||||
std::thread * _rotateBufferThread;
|
||||
std::condition_variable _sleepCondition;
|
||||
std::mutex _sleepMutex;
|
||||
bool _timeDirty;
|
||||
bool _isRotateThreadExited;
|
||||
std::mutex _sleepMutex;
|
||||
bool _timeDirty;
|
||||
bool _isRotateThreadExited;
|
||||
|
||||
std::mutex _play2dMutex;
|
||||
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
http://www.cocos.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#define LOG_TAG "AudioDecoderWav"
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
http://www.cocos.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
@@ -35,14 +36,14 @@ public:
|
||||
AudioDecoderWav();
|
||||
~AudioDecoderWav() override;
|
||||
|
||||
bool open(const char *path) override;
|
||||
void close() override;
|
||||
bool open(const char *path) override;
|
||||
void close() override;
|
||||
uint32_t read(uint32_t framesToRead, char *pcmBuf) override;
|
||||
bool seek(uint32_t frameOffset) override;
|
||||
bool seek(uint32_t frameOffset) override;
|
||||
uint32_t tell() const override;
|
||||
|
||||
private:
|
||||
SF_INFO _sndInfo;
|
||||
SF_INFO _sndInfo;
|
||||
SNDFILE *_sndHandle{};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "cocos/audio/ohos/FsCallback.h"
|
||||
|
||||
#include <rawfile/raw_dir.h>
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Macros.h"
|
||||
#include <memory>
|
||||
#include "Macros.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
Executable → Regular
+3
-3
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string.h>
|
||||
#include <climits>
|
||||
#include "base/Object.h"
|
||||
#include "base/TypeDef.h"
|
||||
#include <climits>
|
||||
#include <string.h>
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2011 Zynga Inc.
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2019-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2019-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "base/Data.h"
|
||||
#include "base/Log.h"
|
||||
#include <cstring>
|
||||
#include "base/Log.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
Executable → Regular
+12
-12
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
#include "Log.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdarg>
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if (CC_PLATFORM == CC_PLATFORM_WINDOWS)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@@ -78,15 +78,15 @@ void Log::setLogFile(const std::string &filename) {
|
||||
struct tm *tm_time;
|
||||
time_t ct_time;
|
||||
time(&ct_time);
|
||||
tm_time = localtime(&ct_time);
|
||||
char dateBuffer[256] = { 0 };
|
||||
tm_time = localtime(&ct_time);
|
||||
char dateBuffer[256] = {0};
|
||||
snprintf(dateBuffer, sizeof(dateBuffer), "LOG DATE: %04d-%02d-%02d %02d:%02d:%02d\n",
|
||||
tm_time->tm_year + 1900,
|
||||
tm_time->tm_mon + 1,
|
||||
tm_time->tm_mday,
|
||||
tm_time->tm_hour,
|
||||
tm_time->tm_min,
|
||||
tm_time->tm_sec);
|
||||
tm_time->tm_year + 1900,
|
||||
tm_time->tm_mon + 1,
|
||||
tm_time->tm_mday,
|
||||
tm_time->tm_hour,
|
||||
tm_time->tm_min,
|
||||
tm_time->tm_sec);
|
||||
|
||||
msg += dateBuffer;
|
||||
|
||||
@@ -126,7 +126,7 @@ void Log::logMessage(LogType type, LogLevel level, const char *formats, ...) {
|
||||
// p += StringUtil::vprintf(p, last, formats, args);
|
||||
|
||||
std::ptrdiff_t count = (last - p);
|
||||
int ret = vsnprintf(p, count, formats, args);
|
||||
int ret = vsnprintf(p, count, formats, args);
|
||||
if (ret >= count - 1) {
|
||||
p += (count - 1);
|
||||
} else if (ret >= 0) {
|
||||
|
||||
Executable → Regular
+6
-6
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -49,11 +49,11 @@ class CC_DLL Log {
|
||||
public:
|
||||
static LogLevel slogLevel; // for read only
|
||||
|
||||
static inline void setLogLevel(LogLevel level) { slogLevel = level; }
|
||||
static inline FILE *getLogFile() { return slogFile; }
|
||||
static void setLogFile(const std::string &filename);
|
||||
static void close();
|
||||
static void logMessage(LogType type, LogLevel level, const char *formats, ...);
|
||||
static inline void setLogLevel(LogLevel level) { slogLevel = level; }
|
||||
static inline FILE *getLogFile() { return slogFile; }
|
||||
static void setLogFile(const std::string &filename);
|
||||
static void close();
|
||||
static void logMessage(LogType type, LogLevel level, const char *formats, ...);
|
||||
|
||||
private:
|
||||
static FILE *slogFile;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2011 Zynga Inc.
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -357,8 +357,8 @@ It should work same as apples CFSwapInt32LittleToHost(..)
|
||||
TypeName(TypeName &&) = delete; \
|
||||
CC_DISALLOW_ASSIGN(TypeName)
|
||||
|
||||
#define ENABLE_COPY_SEMANTICS(cls) \
|
||||
cls(const cls &) = default; \
|
||||
#define CC_ENABLE_COPY_SEMANTICS(cls) \
|
||||
cls(const cls &) = default; \
|
||||
cls &operator=(const cls &) = default;
|
||||
|
||||
#define CC_DISABLE_COPY_SEMANTICS(cls) \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <random>
|
||||
#include <cstdlib>
|
||||
#include <random>
|
||||
|
||||
#include "base/Macros.h"
|
||||
|
||||
@@ -43,21 +43,21 @@ public:
|
||||
template <typename T>
|
||||
static inline T randomReal(T min, T max) {
|
||||
std::uniform_real_distribution<T> dist(min, max);
|
||||
auto &mt = RandomHelper::getEngine();
|
||||
auto & mt = RandomHelper::getEngine();
|
||||
return dist(mt);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T randomInt(T min, T max) {
|
||||
std::uniform_int_distribution<T> dist(min, max);
|
||||
auto &mt = RandomHelper::getEngine();
|
||||
auto & mt = RandomHelper::getEngine();
|
||||
return dist(mt);
|
||||
}
|
||||
|
||||
private:
|
||||
static inline std::mt19937 &getEngine() {
|
||||
static std::random_device seedGen;
|
||||
static std::mt19937 engine(seedGen());
|
||||
static std::mt19937 engine(seedGen());
|
||||
return engine;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2011 Zynga Inc.
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2011 Zynga Inc.
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
#include "StringUtil.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdarg>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include "base/ZipUtils.h"
|
||||
#include "base/base64.h"
|
||||
#include "memory/Memory.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016-2017 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "base/ThreadPool.h"
|
||||
#include "platform/StdC.h"
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include "platform/StdC.h"
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <android/log.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2016-2017 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
@@ -10,10 +10,10 @@
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -21,7 +21,7 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include "Timer.h"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
@@ -10,10 +10,10 @@
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@@ -21,7 +21,7 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <cstdint>
|
||||
#include "base/Macros.h"
|
||||
|
||||
|
||||
namespace cc {
|
||||
namespace utils {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
Copyright (c) 2014-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <climits>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include "base/Macros.h"
|
||||
#include "base/TypeDef.h"
|
||||
/** @file ccUtils.h
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -26,20 +26,20 @@
|
||||
|
||||
#include "base/Value.h"
|
||||
|
||||
#include <memory.h>
|
||||
#include <algorithm>
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <iomanip>
|
||||
#include <memory.h>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/Utils.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
const ValueVector VALUE_VECTOR_NULL;
|
||||
const ValueMap VALUE_MAP_NULL = {};
|
||||
const ValueMap VALUE_MAP_NULL = {};
|
||||
const ValueMapIntKey VALUE_MAP_INT_KEY_NULL = {};
|
||||
|
||||
const Value Value::VALUE_NULL;
|
||||
|
||||
+13
-13
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -33,12 +33,12 @@ namespace cc {
|
||||
|
||||
class Value;
|
||||
|
||||
using ValueVector = vector<Value>;
|
||||
using ValueMap = unordered_map<String, Value>;
|
||||
using ValueVector = vector<Value>;
|
||||
using ValueMap = unordered_map<String, Value>;
|
||||
using ValueMapIntKey = unordered_map<int, Value>;
|
||||
|
||||
CC_DLL extern const ValueVector VALUE_VECTOR_NULL;
|
||||
CC_DLL extern const ValueMap VALUE_MAP_NULL;
|
||||
CC_DLL extern const ValueVector VALUE_VECTOR_NULL;
|
||||
CC_DLL extern const ValueMap VALUE_MAP_NULL;
|
||||
CC_DLL extern const ValueMapIntKey VALUE_MAP_INT_KEY_NULL;
|
||||
|
||||
/*
|
||||
@@ -219,15 +219,15 @@ private:
|
||||
|
||||
union {
|
||||
unsigned char byteVal;
|
||||
int intVal;
|
||||
unsigned int unsignedVal;
|
||||
float floatVal;
|
||||
double doubleVal;
|
||||
bool boolVal;
|
||||
int intVal;
|
||||
unsigned int unsignedVal;
|
||||
float floatVal;
|
||||
double doubleVal;
|
||||
bool boolVal;
|
||||
|
||||
String *strVal;
|
||||
ValueVector *vectorVal;
|
||||
ValueMap *mapVal;
|
||||
String * strVal;
|
||||
ValueVector * vectorVal;
|
||||
ValueMap * mapVal;
|
||||
ValueMapIntKey *intKeyMapVal;
|
||||
} _field;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
#include "base/astc.h"
|
||||
#include "platform/Image.h"
|
||||
|
||||
static const unsigned int MAGIC = 0x5CA1AB13;
|
||||
static const astc_byte ASTC_HEADER_SIZE_X_BEGIN = 7;
|
||||
static const astc_byte ASTC_HEADER_SIZE_Y_BEGIN = 10;
|
||||
static const unsigned int MAGIC = 0x5CA1AB13;
|
||||
static const astc_byte ASTC_HEADER_SIZE_X_BEGIN = 7;
|
||||
static const astc_byte ASTC_HEADER_SIZE_Y_BEGIN = 10;
|
||||
|
||||
bool astcIsValid(const astc_byte *pHeader) {
|
||||
uint32_t magicval = static_cast<uint32_t>(pHeader[0]) +
|
||||
@@ -46,8 +46,8 @@ bool astcIsValid(const astc_byte *pHeader) {
|
||||
int ydim = pHeader[ASTC_HEADER_MAGIC + 1];
|
||||
int zdim = pHeader[ASTC_HEADER_MAGIC + 2];
|
||||
return !((xdim < 3 || xdim > 6 || ydim < 3 || ydim > 6 || zdim < 3 || zdim > 6) &&
|
||||
(xdim < 4 || xdim == 7 || xdim == 9 || xdim == 11 || xdim > 12 ||
|
||||
ydim < 4 || ydim == 7 || ydim == 9 || ydim == 11 || ydim > 12 || zdim != 1));
|
||||
(xdim < 4 || xdim == 7 || xdim == 9 || xdim == 11 || xdim > 12 ||
|
||||
ydim < 4 || ydim == 7 || ydim == 9 || ydim == 11 || ydim > 12 || zdim != 1));
|
||||
}
|
||||
|
||||
int astcGetWidth(const astc_byte *pHeader) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
using astc_byte = unsigned char;
|
||||
using astc_byte = unsigned char;
|
||||
using astc_uint32 = unsigned int;
|
||||
|
||||
// Size of a ASTC header
|
||||
|
||||
#define ASTC_HEADER_SIZE 16
|
||||
#define ASTC_HEADER_SIZE 16
|
||||
|
||||
#define ASTC_HEADER_MAGIC 4
|
||||
#define ASTC_HEADER_MAGIC 4
|
||||
|
||||
// Check if a ASTC header is correctly formatted
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -49,18 +49,18 @@
|
||||
|
||||
#include "csscolorparser.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
namespace CSSColorParser {
|
||||
|
||||
// http://www.w3.org/TR/css3-color/
|
||||
struct NamedColor {
|
||||
const char * name;
|
||||
Color color;
|
||||
const char *name;
|
||||
Color color;
|
||||
};
|
||||
|
||||
const std::vector<NamedColor> NAMED_COLORS = {
|
||||
@@ -214,14 +214,16 @@ const std::vector<NamedColor> NAMED_COLORS = {
|
||||
{"yellowgreen", {154, 205, 50, 1}}};
|
||||
|
||||
template <typename T>
|
||||
uint8_t clampCssByte(T i) { // Clamp to integer 0 .. 255.
|
||||
i = static_cast<T>(::round(i)); // Seems to be what Chrome does (vs truncation).
|
||||
return static_cast<uint8_t>(i < 0 ? 0 : i > 255 ? 255 : i);
|
||||
uint8_t clampCssByte(T i) { // Clamp to integer 0 .. 255.
|
||||
i = static_cast<T>(::round(i)); // Seems to be what Chrome does (vs truncation).
|
||||
return static_cast<uint8_t>(i < 0 ? 0 : i > 255 ? 255
|
||||
: i);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
float clampCssFloat(T f) { // Clamp to float 0.0 .. 1.0.
|
||||
return f < 0 ? 0 : f > 1 ? 1 : float(f);
|
||||
return f < 0 ? 0 : f > 1 ? 1
|
||||
: float(f);
|
||||
}
|
||||
|
||||
float parseFloat(const std::string &str) {
|
||||
@@ -237,7 +239,7 @@ uint8_t parseCssInt(const std::string &str) { // int or percentage.
|
||||
return clampCssByte(parseFloat(str) / 100.0f * 255.0f);
|
||||
}
|
||||
return clampCssByte(parseInt(str));
|
||||
}
|
||||
}
|
||||
|
||||
float parseCssFloat(const std::string &str) { // float or percentage.
|
||||
if (str.length() && str.back() == '%') {
|
||||
@@ -267,8 +269,8 @@ float cssHueToRgb(float m1, float m2, float h) {
|
||||
|
||||
std::vector<std::string> split(const std::string &s, char delim) {
|
||||
std::vector<std::string> elems;
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
while (std::getline(ss, item, delim)) {
|
||||
elems.push_back(item);
|
||||
}
|
||||
@@ -297,13 +299,13 @@ Color parse(const std::string &cssStr) {
|
||||
parseInt(str.substr(1), 16); // REFINE(deanm): Stricter parsing.
|
||||
if (!(iv >= 0 && iv <= 0xfff)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Color(
|
||||
static_cast<uint8_t>(((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8)),
|
||||
static_cast<uint8_t>((iv & 0xf0) | ((iv & 0xf0) >> 4)),
|
||||
static_cast<uint8_t>((iv & 0xf) | ((iv & 0xf) << 4)), 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (str.length() == 7) {
|
||||
int64_t iv = parseInt(str.substr(1), 16); // REFINE(deanm): Stricter parsing.
|
||||
@@ -312,8 +314,8 @@ Color parse(const std::string &cssStr) {
|
||||
}
|
||||
|
||||
return Color(static_cast<uint8_t>((iv & 0xff0000) >> 16),
|
||||
static_cast<uint8_t>((iv & 0xff00) >> 8),
|
||||
static_cast<uint8_t>(iv & 0xff), 1);
|
||||
static_cast<uint8_t>((iv & 0xff00) >> 8),
|
||||
static_cast<uint8_t>(iv & 0xff), 1);
|
||||
}
|
||||
|
||||
return Color();
|
||||
@@ -322,7 +324,7 @@ Color parse(const std::string &cssStr) {
|
||||
size_t op = str.find_first_of('(');
|
||||
size_t ep = str.find_first_of(')');
|
||||
if (op != std::string::npos && ep + 1 == str.length()) {
|
||||
const std::string fname = str.substr(0, op);
|
||||
const std::string fname = str.substr(0, op);
|
||||
const std::vector<std::string> params =
|
||||
split(str.substr(op + 1, ep - (op + 1)), ',');
|
||||
|
||||
@@ -342,8 +344,7 @@ Color parse(const std::string &cssStr) {
|
||||
|
||||
return Color(parseCssInt(params[0]), parseCssInt(params[1]),
|
||||
parseCssInt(params[2]), alpha);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (fname == "hsla" || fname == "hsl") {
|
||||
if (fname == "hsla") {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -49,18 +49,19 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
|
||||
namespace CSSColorParser {
|
||||
|
||||
struct Color {
|
||||
inline Color() = default;
|
||||
inline Color(unsigned char red, unsigned char green, unsigned char blue, float alpha)
|
||||
: r(red), g(green), b(blue), a(alpha > 1 ? 1 : alpha < 0 ? 0 : alpha) {
|
||||
: r(red), g(green), b(blue), a(alpha > 1 ? 1 : alpha < 0 ? 0
|
||||
: alpha) {
|
||||
}
|
||||
unsigned char r = 0, g = 0, b = 0;
|
||||
float a = 1.0f;
|
||||
float a = 1.0f;
|
||||
};
|
||||
|
||||
inline bool operator==(const Color &lhs, const Color &rhs) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
|
||||
static const char kMagic[] = {'P', 'K', 'M', ' ', '1', '0'};
|
||||
|
||||
static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6;
|
||||
static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8;
|
||||
static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6;
|
||||
static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8;
|
||||
static const etc1_uint32 ETC1_PKM_ENCODED_HEIGHT_OFFSET = 10;
|
||||
static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12;
|
||||
static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14;
|
||||
static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12;
|
||||
static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14;
|
||||
|
||||
static const etc1_uint32 ETC1_RGB_NO_MIPMAPS = 0;
|
||||
|
||||
@@ -61,11 +61,11 @@ etc1_bool etc1_pkm_is_valid(const etc1_byte *pHeader) {
|
||||
if (memcmp(pHeader, kMagic, sizeof(kMagic))) {
|
||||
return false;
|
||||
}
|
||||
etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET);
|
||||
etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET);
|
||||
etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET);
|
||||
etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET);
|
||||
etc1_uint32 encodedHeight = readBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET);
|
||||
etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET);
|
||||
etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET);
|
||||
etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET);
|
||||
etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET);
|
||||
return format == ETC1_RGB_NO_MIPMAPS &&
|
||||
encodedWidth >= width && encodedWidth - width < 4 &&
|
||||
encodedHeight >= height && encodedHeight - height < 4;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
#endif
|
||||
|
||||
typedef unsigned char etc1_byte;
|
||||
typedef int etc1_bool;
|
||||
typedef unsigned int etc1_uint32;
|
||||
typedef int etc1_bool;
|
||||
typedef unsigned int etc1_uint32;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
|
||||
static const char kMagic[] = {'P', 'K', 'M', ' ', '2', '0'};
|
||||
|
||||
static const etc2_uint32 ETC2_PKM_FORMAT_OFFSET = 6;
|
||||
static const etc2_uint32 ETC2_PKM_ENCODED_WIDTH_OFFSET = 8;
|
||||
static const etc2_uint32 ETC2_PKM_FORMAT_OFFSET = 6;
|
||||
static const etc2_uint32 ETC2_PKM_ENCODED_WIDTH_OFFSET = 8;
|
||||
static const etc2_uint32 ETC2_PKM_ENCODED_HEIGHT_OFFSET = 10;
|
||||
static const etc2_uint32 ETC2_PKM_WIDTH_OFFSET = 12;
|
||||
static const etc2_uint32 ETC2_PKM_HEIGHT_OFFSET = 14;
|
||||
static const etc2_uint32 ETC2_PKM_WIDTH_OFFSET = 12;
|
||||
static const etc2_uint32 ETC2_PKM_HEIGHT_OFFSET = 14;
|
||||
|
||||
static etc2_uint32 readBEUint16(const etc2_byte *pIn) {
|
||||
return (pIn[0] << 8) | pIn[1];
|
||||
@@ -47,11 +47,11 @@ etc2_bool etc2_pkm_is_valid(const etc2_byte *pHeader) {
|
||||
if (memcmp(pHeader, kMagic, sizeof(kMagic))) {
|
||||
return false;
|
||||
}
|
||||
etc2_uint32 format = readBEUint16(pHeader + ETC2_PKM_FORMAT_OFFSET);
|
||||
etc2_uint32 encodedWidth = readBEUint16(pHeader + ETC2_PKM_ENCODED_WIDTH_OFFSET);
|
||||
etc2_uint32 format = readBEUint16(pHeader + ETC2_PKM_FORMAT_OFFSET);
|
||||
etc2_uint32 encodedWidth = readBEUint16(pHeader + ETC2_PKM_ENCODED_WIDTH_OFFSET);
|
||||
etc2_uint32 encodedHeight = readBEUint16(pHeader + ETC2_PKM_ENCODED_HEIGHT_OFFSET);
|
||||
etc2_uint32 width = readBEUint16(pHeader + ETC2_PKM_WIDTH_OFFSET);
|
||||
etc2_uint32 height = readBEUint16(pHeader + ETC2_PKM_HEIGHT_OFFSET);
|
||||
etc2_uint32 width = readBEUint16(pHeader + ETC2_PKM_WIDTH_OFFSET);
|
||||
etc2_uint32 height = readBEUint16(pHeader + ETC2_PKM_HEIGHT_OFFSET);
|
||||
return (format == ETC2_RGB_NO_MIPMAPS || format == ETC2_RGBA_NO_MIPMAPS) &&
|
||||
encodedWidth >= width && encodedWidth - width < 4 &&
|
||||
encodedHeight >= height && encodedHeight - height < 4;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
Copyright (c) 2017-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2017-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
typedef unsigned char etc2_byte;
|
||||
typedef int etc2_bool;
|
||||
typedef unsigned int etc2_uint32;
|
||||
typedef int etc2_bool;
|
||||
typedef unsigned int etc2_uint32;
|
||||
|
||||
#ifndef GL_COMPRESSED_RGB8_ETC2
|
||||
#define GL_COMPRESSED_RGB8_ETC2 0x9274
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "taskflow/taskflow.hpp"
|
||||
#include <algorithm>
|
||||
#include <thread>
|
||||
#include "taskflow/taskflow.hpp"
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2020-2021 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020-2022 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "tbb/global_control.h"
|
||||
#include <algorithm>
|
||||
#include <thread>
|
||||
#include "tbb/global_control.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user