diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index 8cd18799f1..9f1f66bcb6 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -509,6 +509,29 @@ cocos_source_files( cocos/renderer/core/TypeDef.h cocos/renderer/core/util/StringUtil.cc cocos/renderer/core/util/StringUtil.h + cocos/renderer/pipeline/BatchedBuffer.cpp + cocos/renderer/pipeline/BatchedBuffer.h + cocos/renderer/pipeline/Define.h + cocos/renderer/pipeline/InstancedBuffer.cpp + cocos/renderer/pipeline/InstancedBuffer.h + cocos/renderer/pipeline/RenderBatchedQueue.cpp + cocos/renderer/pipeline/RenderBatchedQueue.h + cocos/renderer/pipeline/RenderFlow.cpp + cocos/renderer/pipeline/RenderFlow.h + cocos/renderer/pipeline/RenderInstancedQueue.cpp + cocos/renderer/pipeline/RenderInstancedQueue.h + cocos/renderer/pipeline/RenderPipeline.cpp + cocos/renderer/pipeline/RenderPipeline.h + cocos/renderer/pipeline/RenderStage.cpp + cocos/renderer/pipeline/RenderStage.h + cocos/renderer/pipeline/RenderView.cpp + cocos/renderer/pipeline/RenderView.h + cocos/renderer/pipeline/forward/ForwardFlow.cpp + cocos/renderer/pipeline/forward/ForwardFlow.h + cocos/renderer/pipeline/forward/ForwardPipeline.cpp + cocos/renderer/pipeline/forward/ForwardPipeline.h + cocos/renderer/pipeline/forward/ForwardStage.cpp + cocos/renderer/pipeline/forward/ForwardStage.h ) if(CC_USE_GLES2) diff --git a/native/cocos/audio/AudioEngine.cpp b/native/cocos/audio/AudioEngine.cpp index 0ac387c97a..0ce6ba4148 100644 --- a/native/cocos/audio/AudioEngine.cpp +++ b/native/cocos/audio/AudioEngine.cpp @@ -52,7 +52,7 @@ #undef ERROR #endif // ERROR -using namespace cocos2d; +using namespace cc; const int AudioEngine::INVALID_AUDIO_ID = -1; const float AudioEngine::TIME_UNKNOWN = -1.0f; diff --git a/native/cocos/audio/android/AssetFd.cpp b/native/cocos/audio/android/AssetFd.cpp index fcd9360216..d5fef062c1 100644 --- a/native/cocos/audio/android/AssetFd.cpp +++ b/native/cocos/audio/android/AssetFd.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "audio/android/cutils/log.h" #include "audio/android/AssetFd.h" -namespace cocos2d { +namespace cc { AssetFd::AssetFd(int assetFd) : _assetFd(assetFd) @@ -45,4 +45,4 @@ AssetFd::~AssetFd() } }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AssetFd.h b/native/cocos/audio/android/AssetFd.h index 7d62ec67f2..dbdf917ca1 100644 --- a/native/cocos/audio/android/AssetFd.h +++ b/native/cocos/audio/android/AssetFd.h @@ -26,7 +26,7 @@ THE SOFTWARE. #include -namespace cocos2d { +namespace cc { class AssetFd { @@ -39,5 +39,5 @@ private: int _assetFd; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioBufferProvider.h b/native/cocos/audio/android/AudioBufferProvider.h index c682649c74..470e8ee885 100644 --- a/native/cocos/audio/android/AudioBufferProvider.h +++ b/native/cocos/audio/android/AudioBufferProvider.h @@ -20,7 +20,7 @@ #include #include "audio/android/utils/Errors.h" -namespace cocos2d { +namespace cc { // ---------------------------------------------------------------------------- class AudioBufferProvider @@ -77,4 +77,4 @@ public: }; // ---------------------------------------------------------------------------- -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioDecoder.cpp b/native/cocos/audio/android/AudioDecoder.cpp index 5a9fec6f68..5d9a75c849 100644 --- a/native/cocos/audio/android/AudioDecoder.cpp +++ b/native/cocos/audio/android/AudioDecoder.cpp @@ -33,7 +33,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { size_t AudioDecoder::fileRead(void* ptr, size_t size, size_t nmemb, void* datasource) { @@ -290,4 +290,4 @@ bool AudioDecoder::interleave() return false; } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioDecoder.h b/native/cocos/audio/android/AudioDecoder.h index 0e91e5d816..063ec5ad59 100644 --- a/native/cocos/audio/android/AudioDecoder.h +++ b/native/cocos/audio/android/AudioDecoder.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include "audio/android/PcmData.h" #include "base/CCData.h" -namespace cocos2d { +namespace cc { class AudioDecoder { @@ -61,4 +61,4 @@ protected: size_t _fileCurrPos; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioDecoderMp3.cpp b/native/cocos/audio/android/AudioDecoderMp3.cpp index c1a2f6f675..4db267ff84 100644 --- a/native/cocos/audio/android/AudioDecoderMp3.cpp +++ b/native/cocos/audio/android/AudioDecoderMp3.cpp @@ -29,7 +29,7 @@ THE SOFTWARE. #include "audio/android/mp3reader.h" #include "platform/CCFileUtils.h" -namespace cocos2d { +namespace cc { AudioDecoderMp3::AudioDecoderMp3() { @@ -80,4 +80,4 @@ bool AudioDecoderMp3::decodeToPcm() return false; } -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderMp3.h b/native/cocos/audio/android/AudioDecoderMp3.h index 1f27d07477..9449c807f9 100644 --- a/native/cocos/audio/android/AudioDecoderMp3.h +++ b/native/cocos/audio/android/AudioDecoderMp3.h @@ -27,7 +27,7 @@ THE SOFTWARE. #include "audio/android/AudioDecoder.h" -namespace cocos2d { +namespace cc { class AudioDecoderMp3 : public AudioDecoder { @@ -40,4 +40,4 @@ protected: friend class AudioDecoderProvider; }; -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderOgg.cpp b/native/cocos/audio/android/AudioDecoderOgg.cpp index c19630fd48..4afa247760 100644 --- a/native/cocos/audio/android/AudioDecoderOgg.cpp +++ b/native/cocos/audio/android/AudioDecoderOgg.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "audio/android/AudioDecoderOgg.h" #include "platform/CCFileUtils.h" -namespace cocos2d { +namespace cc { AudioDecoderOgg::AudioDecoderOgg() { @@ -110,4 +110,4 @@ bool AudioDecoderOgg::decodeToPcm() return (curPos > 0); } -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderOgg.h b/native/cocos/audio/android/AudioDecoderOgg.h index c528a291ae..1c30ba6557 100644 --- a/native/cocos/audio/android/AudioDecoderOgg.h +++ b/native/cocos/audio/android/AudioDecoderOgg.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include "tremolo/Tremolo/ivorbisfile.h" -namespace cocos2d { +namespace cc { class AudioDecoderOgg : public AudioDecoder { @@ -43,4 +43,4 @@ protected: friend class AudioDecoderProvider; }; -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderProvider.cpp b/native/cocos/audio/android/AudioDecoderProvider.cpp index 11a22e89d5..27c170ea6a 100644 --- a/native/cocos/audio/android/AudioDecoderProvider.cpp +++ b/native/cocos/audio/android/AudioDecoderProvider.cpp @@ -32,7 +32,7 @@ #include "audio/android/AudioDecoderWav.h" #include "platform/CCFileUtils.h" -namespace cocos2d { +namespace cc { AudioDecoder* AudioDecoderProvider::createAudioDecoder(SLEngineItf engineItf, const std::string &url, int bufferSizeInFrames, int sampleRate, const FdGetterCallback &fdGetterCallback) { @@ -91,4 +91,4 @@ void AudioDecoderProvider::destroyAudioDecoder(AudioDecoder** decoder) } } -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderProvider.h b/native/cocos/audio/android/AudioDecoderProvider.h index 1cd7b39ace..8eabc6420c 100644 --- a/native/cocos/audio/android/AudioDecoderProvider.h +++ b/native/cocos/audio/android/AudioDecoderProvider.h @@ -27,7 +27,7 @@ THE SOFTWARE. #include "audio/android/OpenSLHelper.h" -namespace cocos2d { +namespace cc { class AudioDecoder; @@ -38,4 +38,4 @@ public: static void destroyAudioDecoder(AudioDecoder** decoder); }; -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderSLES.cpp b/native/cocos/audio/android/AudioDecoderSLES.cpp index c00d958aa5..18034ab7c8 100644 --- a/native/cocos/audio/android/AudioDecoderSLES.cpp +++ b/native/cocos/audio/android/AudioDecoderSLES.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { /* Explicitly requesting SL_IID_ANDROIDSIMPLEBUFFERQUEUE and SL_IID_PREFETCHSTATUS * on the UrlAudioPlayer object for decoding, SL_IID_METADATAEXTRACTION for retrieving the @@ -646,4 +646,4 @@ void AudioDecoderSLES::decodeToPcmCallback(SLAndroidSimpleBufferQueueItf queueIt queryAudioInfo(); } -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderSLES.h b/native/cocos/audio/android/AudioDecoderSLES.h index 1c9c04bd27..4659e09473 100644 --- a/native/cocos/audio/android/AudioDecoderSLES.h +++ b/native/cocos/audio/android/AudioDecoderSLES.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { class AudioDecoderSLES : public AudioDecoder { @@ -94,4 +94,4 @@ private: friend class AudioDecoderProvider; }; -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderWav.cpp b/native/cocos/audio/android/AudioDecoderWav.cpp index 723aeb0ec2..bb5ddf4d90 100644 --- a/native/cocos/audio/android/AudioDecoderWav.cpp +++ b/native/cocos/audio/android/AudioDecoderWav.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include -namespace cocos2d { +namespace cc { AudioDecoderWav::AudioDecoderWav() { @@ -112,4 +112,4 @@ bool AudioDecoderWav::decodeToPcm() return ret; } -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioDecoderWav.h b/native/cocos/audio/android/AudioDecoderWav.h index c9d64053b9..c353f5e1c4 100644 --- a/native/cocos/audio/android/AudioDecoderWav.h +++ b/native/cocos/audio/android/AudioDecoderWav.h @@ -27,7 +27,7 @@ THE SOFTWARE. #include "audio/android/AudioDecoder.h" -namespace cocos2d { +namespace cc { class AudioDecoderWav : public AudioDecoder { @@ -44,4 +44,4 @@ protected: friend class AudioDecoderProvider; }; -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/AudioEngine-inl.cpp b/native/cocos/audio/android/AudioEngine-inl.cpp index 73a2aa6a10..e0e4313619 100644 --- a/native/cocos/audio/android/AudioEngine-inl.cpp +++ b/native/cocos/audio/android/AudioEngine-inl.cpp @@ -55,7 +55,7 @@ #include "scripting/js-bindings/event/EventDispatcher.h" #include "scripting/js-bindings/event/CustomEventTypes.h" -using namespace cocos2d; +using namespace cc; // Audio focus values synchronized with which in cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java namespace @@ -102,13 +102,13 @@ static CallerThreadUtils __callerThreadUtils; static int fdGetter(const std::string& url, off_t* start, off_t* length) { int fd = -1; - if (cocos2d::FileUtilsAndroid::getObbFile() != nullptr) + if (cc::FileUtilsAndroid::getObbFile() != nullptr) { fd = getObbAssetFileDescriptorJNI(url.c_str(), start, length); } if (fd <= 0) { - auto asset = AAssetManager_open(cocos2d::FileUtilsAndroid::getAssetManager(), url.c_str(), AASSET_MODE_UNKNOWN); + auto asset = AAssetManager_open(cc::FileUtilsAndroid::getAssetManager(), url.c_str(), AASSET_MODE_UNKNOWN); // open asset as file descriptor fd = AAsset_openFileDescriptor(asset, start, length); AAsset_close(asset); diff --git a/native/cocos/audio/android/AudioEngine-inl.h b/native/cocos/audio/android/AudioEngine-inl.h index 2413d6229f..818f3e9dc2 100644 --- a/native/cocos/audio/android/AudioEngine-inl.h +++ b/native/cocos/audio/android/AudioEngine-inl.h @@ -40,7 +40,7 @@ #define ERRORLOG(msg) log("fun:%s,line:%d,msg:%s",__func__,__LINE__,#msg) -NS_CC_BEGIN +namespace cc { struct CustomEvent; @@ -49,7 +49,7 @@ class AudioPlayerProvider; class AudioEngineImpl; -class AudioEngineImpl : public cocos2d::Ref +class AudioEngineImpl : public cc::Ref { public: AudioEngineImpl(); @@ -97,6 +97,6 @@ private: }; #endif // __AUDIO_ENGINE_INL_H_ -NS_CC_END +} #endif diff --git a/native/cocos/audio/android/AudioMixer.cpp b/native/cocos/audio/android/AudioMixer.cpp index fc14299dfd..0245ef1449 100644 --- a/native/cocos/audio/android/AudioMixer.cpp +++ b/native/cocos/audio/android/AudioMixer.cpp @@ -73,7 +73,7 @@ static const bool kUseFloat = false; // Set to default copy buffer size in frames for input processing. static const size_t kCopyBufferFrameCount = 256; -namespace cocos2d { +namespace cc { // ---------------------------------------------------------------------------- @@ -2098,4 +2098,4 @@ AudioMixer::process_hook_t AudioMixer::getProcessHook(int processType, uint32_t } // ---------------------------------------------------------------------------- -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioMixer.h b/native/cocos/audio/android/AudioMixer.h index 26f34dc13c..df04d51fdb 100644 --- a/native/cocos/audio/android/AudioMixer.h +++ b/native/cocos/audio/android/AudioMixer.h @@ -30,7 +30,7 @@ // IDEA: This is actually unity gain, which might not be max in future, expressed in U.12 #define MAX_GAIN_INT AudioMixer::UNITY_GAIN_INT -namespace cocos2d { +namespace cc { // ---------------------------------------------------------------------------- @@ -386,4 +386,4 @@ private: }; // ---------------------------------------------------------------------------- -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioMixerController.cpp b/native/cocos/audio/android/AudioMixerController.cpp index 415f281d7a..ccf191ceb1 100644 --- a/native/cocos/audio/android/AudioMixerController.cpp +++ b/native/cocos/audio/android/AudioMixerController.cpp @@ -32,7 +32,7 @@ THE SOFTWARE. #include -namespace cocos2d { +namespace cc { AudioMixerController::AudioMixerController(int bufferSizeInFrames, int sampleRate, int channelCount) : _bufferSizeInFrames(bufferSizeInFrames) @@ -347,4 +347,4 @@ bool AudioMixerController::hasPlayingTacks() return false; } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioMixerController.h b/native/cocos/audio/android/AudioMixerController.h index 8c0becaec9..59b0c9761c 100644 --- a/native/cocos/audio/android/AudioMixerController.h +++ b/native/cocos/audio/android/AudioMixerController.h @@ -33,7 +33,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { class Track; class AudioMixer; @@ -85,4 +85,4 @@ private: std::atomic_bool _isMixingFrame; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioMixerOps.h b/native/cocos/audio/android/AudioMixerOps.h index 6332ace3cd..7718155fed 100644 --- a/native/cocos/audio/android/AudioMixerOps.h +++ b/native/cocos/audio/android/AudioMixerOps.h @@ -18,7 +18,7 @@ #include "audio/android/cutils/log.h" -namespace cocos2d { +namespace cc { /* Behavior of is_same<>::value is true if the types are identical, * false otherwise. Identical to the STL std::is_same. @@ -446,5 +446,5 @@ inline void volumeMulti(TO* out, size_t frameCount, } } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioPlayerProvider.cpp b/native/cocos/audio/android/AudioPlayerProvider.cpp index b360afddbf..1bb3a73bf0 100644 --- a/native/cocos/audio/android/AudioPlayerProvider.cpp +++ b/native/cocos/audio/android/AudioPlayerProvider.cpp @@ -40,7 +40,7 @@ THE SOFTWARE. #include #include // for std::find_if -namespace cocos2d { +namespace cc { static int getSystemAPILevel() { @@ -526,4 +526,4 @@ void AudioPlayerProvider::resume() } } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioPlayerProvider.h b/native/cocos/audio/android/AudioPlayerProvider.h index 3d5e4b21d9..4c39cd13aa 100644 --- a/native/cocos/audio/android/AudioPlayerProvider.h +++ b/native/cocos/audio/android/AudioPlayerProvider.h @@ -33,7 +33,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { // Manage PcmAudioPlayer& UrlAudioPlayer class PcmAudioPlayer; @@ -125,5 +125,5 @@ private: ThreadPool* _threadPool; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioResampler.cpp b/native/cocos/audio/android/AudioResampler.cpp index c23eea2cc0..e10b0382b6 100644 --- a/native/cocos/audio/android/AudioResampler.cpp +++ b/native/cocos/audio/android/AudioResampler.cpp @@ -39,7 +39,7 @@ -namespace cocos2d { +namespace cc { // ---------------------------------------------------------------------------- @@ -785,4 +785,4 @@ void AudioResamplerOrder1::AsmStereo16Loop(int16_t *in, int32_t* maxOutPt, int32 // ---------------------------------------------------------------------------- -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioResampler.h b/native/cocos/audio/android/AudioResampler.h index bf41fdeb57..e8f08a1083 100644 --- a/native/cocos/audio/android/AudioResampler.h +++ b/native/cocos/audio/android/AudioResampler.h @@ -31,7 +31,7 @@ #include #include "audio/android/audio.h" -namespace cocos2d { +namespace cc { class AudioResampler { @@ -178,4 +178,4 @@ private: }; // ---------------------------------------------------------------------------- -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioResamplerCubic.cpp b/native/cocos/audio/android/AudioResamplerCubic.cpp index f0cca35c35..2d2b70607f 100644 --- a/native/cocos/audio/android/AudioResamplerCubic.cpp +++ b/native/cocos/audio/android/AudioResamplerCubic.cpp @@ -24,7 +24,7 @@ #include "audio/android/AudioResampler.h" #include "audio/android/AudioResamplerCubic.h" -namespace cocos2d { +namespace cc { // ---------------------------------------------------------------------------- void AudioResamplerCubic::init() { @@ -188,4 +188,4 @@ save_state: } // ---------------------------------------------------------------------------- -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioResamplerCubic.h b/native/cocos/audio/android/AudioResamplerCubic.h index a98e107782..f4da2dd3f7 100644 --- a/native/cocos/audio/android/AudioResamplerCubic.h +++ b/native/cocos/audio/android/AudioResamplerCubic.h @@ -22,7 +22,7 @@ #include "audio/android/AudioResampler.h" #include "audio/android/AudioBufferProvider.h" -namespace cocos2d { +namespace cc { // ---------------------------------------------------------------------------- class AudioResamplerCubic : public AudioResampler { @@ -62,4 +62,4 @@ private: }; // ---------------------------------------------------------------------------- -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/AudioResamplerPublic.h b/native/cocos/audio/android/AudioResamplerPublic.h index bffb3d6e82..3168443ce3 100644 --- a/native/cocos/audio/android/AudioResamplerPublic.h +++ b/native/cocos/audio/android/AudioResamplerPublic.h @@ -19,7 +19,7 @@ #include #include -namespace cocos2d { +namespace cc { // AUDIO_RESAMPLER_DOWN_RATIO_MAX is the maximum ratio between the original // audio sample rate and the target rate when downsampling, @@ -169,6 +169,6 @@ static inline bool isMusicRate(uint32_t sampleRate) { return sampleRate >= AUDIO_PROCESSING_MUSIC_RATE; } -} // namespace cocos2d { +} // namespace cc { // --------------------------------------------------------------------------- diff --git a/native/cocos/audio/android/IAudioPlayer.h b/native/cocos/audio/android/IAudioPlayer.h index 69da0d96cb..5e9f9d7f72 100644 --- a/native/cocos/audio/android/IAudioPlayer.h +++ b/native/cocos/audio/android/IAudioPlayer.h @@ -27,7 +27,7 @@ THE SOFTWARE. #include -namespace cocos2d { +namespace cc { class IAudioPlayer { @@ -86,4 +86,4 @@ public: virtual void setPlayEventCallback(const PlayEventCallback &playEventCallback) = 0; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/ICallerThreadUtils.h b/native/cocos/audio/android/ICallerThreadUtils.h index f7a3febdd0..9f3f679d0a 100644 --- a/native/cocos/audio/android/ICallerThreadUtils.h +++ b/native/cocos/audio/android/ICallerThreadUtils.h @@ -27,7 +27,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { class ICallerThreadUtils { @@ -39,4 +39,4 @@ public: virtual std::thread::id getCallerThreadId() = 0; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/IVolumeProvider.h b/native/cocos/audio/android/IVolumeProvider.h index 04817e2828..b06188fc09 100644 --- a/native/cocos/audio/android/IVolumeProvider.h +++ b/native/cocos/audio/android/IVolumeProvider.h @@ -26,7 +26,7 @@ THE SOFTWARE. #include "audio/android/audio_utils/include/audio_utils/minifloat.h" -namespace cocos2d { +namespace cc { class IVolumeProvider { @@ -42,4 +42,4 @@ protected: { } }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/PcmAudioPlayer.cpp b/native/cocos/audio/android/PcmAudioPlayer.cpp index 291a8933e1..f539349794 100644 --- a/native/cocos/audio/android/PcmAudioPlayer.cpp +++ b/native/cocos/audio/android/PcmAudioPlayer.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include "audio/android/AudioMixerController.h" #include "audio/android/ICallerThreadUtils.h" -namespace cocos2d { +namespace cc { PcmAudioPlayer::PcmAudioPlayer(AudioMixerController * controller, ICallerThreadUtils* callerThreadUtils) : _id(-1) @@ -223,4 +223,4 @@ IAudioPlayer::State PcmAudioPlayer::getState() const return state; } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/PcmAudioPlayer.h b/native/cocos/audio/android/PcmAudioPlayer.h index 55ffbfe752..af2688b5e8 100644 --- a/native/cocos/audio/android/PcmAudioPlayer.h +++ b/native/cocos/audio/android/PcmAudioPlayer.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include "audio/android/PcmData.h" #include "audio/android/Track.h" -namespace cocos2d { +namespace cc { class ICallerThreadUtils; class AudioMixerController; @@ -95,4 +95,4 @@ private: friend class AudioPlayerProvider; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/PcmAudioService.cpp b/native/cocos/audio/android/PcmAudioService.cpp index 7a1a5754b0..80d845ee13 100644 --- a/native/cocos/audio/android/PcmAudioService.cpp +++ b/native/cocos/audio/android/PcmAudioService.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "audio/android/PcmAudioService.h" #include "audio/android/AudioMixerController.h" -namespace cocos2d { +namespace cc { static std::vector __silenceData; @@ -190,4 +190,4 @@ void PcmAudioService::resume() SL_RETURN_IF_FAILED(r, "PcmAudioService::resume failed"); } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/PcmAudioService.h b/native/cocos/audio/android/PcmAudioService.h index 17c9d945ef..45c2882f06 100644 --- a/native/cocos/audio/android/PcmAudioService.h +++ b/native/cocos/audio/android/PcmAudioService.h @@ -32,7 +32,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { class AudioMixerController; @@ -78,4 +78,4 @@ private: friend class AudioPlayerProvider; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/PcmBufferProvider.cpp b/native/cocos/audio/android/PcmBufferProvider.cpp index 617728f2f0..3fc32e2b02 100644 --- a/native/cocos/audio/android/PcmBufferProvider.cpp +++ b/native/cocos/audio/android/PcmBufferProvider.cpp @@ -35,7 +35,7 @@ THE SOFTWARE. #define ALOGVV(a...) do { } while (0) #endif -namespace cocos2d { +namespace cc { PcmBufferProvider::PcmBufferProvider() : _addr(nullptr) @@ -99,4 +99,4 @@ void PcmBufferProvider::reset() { _nextFrame = 0; } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/PcmBufferProvider.h b/native/cocos/audio/android/PcmBufferProvider.h index 9054b3c991..bd8f354709 100644 --- a/native/cocos/audio/android/PcmBufferProvider.h +++ b/native/cocos/audio/android/PcmBufferProvider.h @@ -30,7 +30,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { class PcmBufferProvider : public AudioBufferProvider { @@ -49,4 +49,4 @@ protected: size_t _unrel; // number of frames not yet released }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/PcmData.cpp b/native/cocos/audio/android/PcmData.cpp index 200dee0d98..b27992ecc0 100644 --- a/native/cocos/audio/android/PcmData.cpp +++ b/native/cocos/audio/android/PcmData.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "audio/android/OpenSLHelper.h" #include "audio/android/PcmData.h" -namespace cocos2d { +namespace cc { PcmData::PcmData() { @@ -136,4 +136,4 @@ std::string PcmData::toString() const return ret; } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/PcmData.h b/native/cocos/audio/android/PcmData.h index e3959cac1d..a0a2d542ca 100644 --- a/native/cocos/audio/android/PcmData.h +++ b/native/cocos/audio/android/PcmData.h @@ -30,7 +30,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { struct PcmData { @@ -63,4 +63,4 @@ struct PcmData std::string toString() const; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/Track.cpp b/native/cocos/audio/android/Track.cpp index 847d1a442f..cd113ed66c 100644 --- a/native/cocos/audio/android/Track.cpp +++ b/native/cocos/audio/android/Track.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include -namespace cocos2d { +namespace cc { Track::Track(const PcmData &pcmData) : onStateChanged(nullptr) @@ -103,4 +103,4 @@ void Track::setState(State state) } }; -} // namespace cocos2d { \ No newline at end of file +} // namespace cc { \ No newline at end of file diff --git a/native/cocos/audio/android/Track.h b/native/cocos/audio/android/Track.h index 191c154276..0ba6e7f5f4 100644 --- a/native/cocos/audio/android/Track.h +++ b/native/cocos/audio/android/Track.h @@ -32,7 +32,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { class Track : public PcmBufferProvider, public IVolumeProvider { @@ -104,4 +104,4 @@ private: friend class AudioMixerController; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/UrlAudioPlayer.cpp b/native/cocos/audio/android/UrlAudioPlayer.cpp index cb90841440..9c6a8d44ec 100644 --- a/native/cocos/audio/android/UrlAudioPlayer.cpp +++ b/native/cocos/audio/android/UrlAudioPlayer.cpp @@ -34,12 +34,12 @@ THE SOFTWARE. namespace { std::mutex __playerContainerMutex; -std::vector __playerContainer; +std::vector __playerContainer; std::once_flag __onceFlag; } -namespace cocos2d { +namespace cc { class SLUrlAudioPlayerCallbackProxy { @@ -421,4 +421,4 @@ void UrlAudioPlayer::destroy() } } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/UrlAudioPlayer.h b/native/cocos/audio/android/UrlAudioPlayer.h index 9f23c2b453..6f9c16cea2 100644 --- a/native/cocos/audio/android/UrlAudioPlayer.h +++ b/native/cocos/audio/android/UrlAudioPlayer.h @@ -33,7 +33,7 @@ THE SOFTWARE. #include #include -namespace cocos2d { +namespace cc { class ICallerThreadUtils; class AssetFd; @@ -132,4 +132,4 @@ private: friend class AudioPlayerProvider; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/android/utils/Errors.h b/native/cocos/audio/android/utils/Errors.h index 5c18a78397..88b5d5f01e 100644 --- a/native/cocos/audio/android/utils/Errors.h +++ b/native/cocos/audio/android/utils/Errors.h @@ -20,7 +20,7 @@ #include #include -namespace cocos2d { +namespace cc { // use this type to return error codes #ifdef _WIN32 @@ -81,7 +81,7 @@ enum { # define NO_ERROR 0L #endif -} // namespace cocos2d { +} // namespace cc { // --------------------------------------------------------------------------- diff --git a/native/cocos/audio/android/utils/Utils.cpp b/native/cocos/audio/android/utils/Utils.cpp index 5a7d96ffa9..959142b485 100644 --- a/native/cocos/audio/android/utils/Utils.cpp +++ b/native/cocos/audio/android/utils/Utils.cpp @@ -26,11 +26,11 @@ THE SOFTWARE. #include "platform/android/jni/JniHelper.h" #include -namespace cocos2d { +namespace cc { int getSDKVersion() { return JniHelper::getAndroidApp()->activity->sdkVersion; } -} // end of namespace cocos2d +} // end of namespace cc diff --git a/native/cocos/audio/android/utils/Utils.h b/native/cocos/audio/android/utils/Utils.h index b48558bc1e..7ff4e62157 100644 --- a/native/cocos/audio/android/utils/Utils.h +++ b/native/cocos/audio/android/utils/Utils.h @@ -25,6 +25,6 @@ THE SOFTWARE. #include -namespace cocos2d { +namespace cc { extern int getSDKVersion(); } diff --git a/native/cocos/audio/apple/AudioCache.h b/native/cocos/audio/apple/AudioCache.h index 2770398c53..b951484aa7 100644 --- a/native/cocos/audio/apple/AudioCache.h +++ b/native/cocos/audio/apple/AudioCache.h @@ -36,7 +36,7 @@ #include "base/ccMacros.h" #include "audio/apple/AudioMacros.h" -NS_CC_BEGIN +namespace cc { class AudioEngineImpl; class AudioPlayer; @@ -107,6 +107,6 @@ protected: friend class AudioPlayer; }; -NS_CC_END +} #endif diff --git a/native/cocos/audio/apple/AudioCache.mm b/native/cocos/audio/apple/AudioCache.mm index 9e5677ab69..1f85e682c7 100644 --- a/native/cocos/audio/apple/AudioCache.mm +++ b/native/cocos/audio/apple/AudioCache.mm @@ -87,7 +87,7 @@ unsigned int __idIndex = 0; @end -using namespace cocos2d; +using namespace cc; AudioCache::AudioCache() : _format(-1) diff --git a/native/cocos/audio/apple/AudioDecoder.h b/native/cocos/audio/apple/AudioDecoder.h index bb000c20a5..6da24dfe0d 100644 --- a/native/cocos/audio/apple/AudioDecoder.h +++ b/native/cocos/audio/apple/AudioDecoder.h @@ -28,7 +28,7 @@ #include #import -namespace cocos2d { +namespace cc { /** * @brief The class for decoding compressed audio file to PCM buffer. @@ -117,4 +117,4 @@ private: AudioStreamBasicDescription _outputFormat; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/apple/AudioDecoder.mm b/native/cocos/audio/apple/AudioDecoder.mm index 21285648f4..2b2b0642af 100644 --- a/native/cocos/audio/apple/AudioDecoder.mm +++ b/native/cocos/audio/apple/AudioDecoder.mm @@ -30,7 +30,7 @@ #define LOG_TAG "AudioDecoder" -namespace cocos2d { +namespace cc { AudioDecoder::AudioDecoder() : _isOpened(false) @@ -226,4 +226,4 @@ namespace cocos2d { return _isOpened; } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/apple/AudioEngine-inl.h b/native/cocos/audio/apple/AudioEngine-inl.h index d8ecef8275..3b18fec56d 100644 --- a/native/cocos/audio/apple/AudioEngine-inl.h +++ b/native/cocos/audio/apple/AudioEngine-inl.h @@ -35,12 +35,12 @@ #include "audio/apple/AudioCache.h" #include "audio/apple/AudioPlayer.h" -NS_CC_BEGIN +namespace cc { class Scheduler; #define MAX_AUDIOINSTANCES 24 -class AudioEngineImpl : public cocos2d::Ref +class AudioEngineImpl : public cc::Ref { public: AudioEngineImpl(); @@ -88,6 +88,6 @@ private: int _currentAudioID; std::weak_ptr _scheduler; }; -NS_CC_END +} #endif // __AUDIO_ENGINE_INL_H_ #endif diff --git a/native/cocos/audio/apple/AudioEngine-inl.mm b/native/cocos/audio/apple/AudioEngine-inl.mm index 578adf4f08..56c5c95c08 100644 --- a/native/cocos/audio/apple/AudioEngine-inl.mm +++ b/native/cocos/audio/apple/AudioEngine-inl.mm @@ -42,7 +42,7 @@ #include "base/CCScheduler.h" #include "base/ccUtils.h" -using namespace cocos2d; +using namespace cc; static ALCdevice* s_ALDevice = nullptr; static ALCcontext* s_ALContext = nullptr; diff --git a/native/cocos/audio/apple/AudioPlayer.h b/native/cocos/audio/apple/AudioPlayer.h index 03e999e3e3..dbce20c9d2 100644 --- a/native/cocos/audio/apple/AudioPlayer.h +++ b/native/cocos/audio/apple/AudioPlayer.h @@ -37,7 +37,7 @@ #include #include -NS_CC_BEGIN +namespace cc { class AudioCache; class AudioEngineImpl; @@ -89,6 +89,6 @@ protected: friend class AudioEngineImpl; }; -NS_CC_END +} #endif diff --git a/native/cocos/audio/apple/AudioPlayer.mm b/native/cocos/audio/apple/AudioPlayer.mm index ed63a748f5..75fdf2a342 100644 --- a/native/cocos/audio/apple/AudioPlayer.mm +++ b/native/cocos/audio/apple/AudioPlayer.mm @@ -41,7 +41,7 @@ #define ALOGVV(...) do{} while(false) #endif -using namespace cocos2d; +using namespace cc; namespace { unsigned int __idIndex = 0; diff --git a/native/cocos/audio/include/AudioEngine.h b/native/cocos/audio/include/AudioEngine.h index 4f7fed99ba..14c04463b3 100644 --- a/native/cocos/audio/include/AudioEngine.h +++ b/native/cocos/audio/include/AudioEngine.h @@ -47,7 +47,7 @@ * @{ */ -NS_CC_BEGIN +namespace cc { /** * @class AudioProfile * @@ -386,7 +386,7 @@ private: friend class AudioEngineImpl; }; -NS_CC_END +} // end group /// @} diff --git a/native/cocos/audio/win32/AudioCache.cpp b/native/cocos/audio/win32/AudioCache.cpp index 1f40cd4eca..7977ab7877 100644 --- a/native/cocos/audio/win32/AudioCache.cpp +++ b/native/cocos/audio/win32/AudioCache.cpp @@ -51,7 +51,7 @@ unsigned int __idIndex = 0; #define INVALID_AL_BUFFER_ID 0xFFFFFFFF #define PCMDATA_CACHEMAXSIZE 1048576 -using namespace cocos2d; +using namespace cc; AudioCache::AudioCache() : _totalFrames(0) diff --git a/native/cocos/audio/win32/AudioCache.h b/native/cocos/audio/win32/AudioCache.h index 1f3446fb49..d5314d0716 100644 --- a/native/cocos/audio/win32/AudioCache.h +++ b/native/cocos/audio/win32/AudioCache.h @@ -42,7 +42,7 @@ #include "base/ccMacros.h" #include "audio/win32/AudioMacros.h" -NS_CC_BEGIN +namespace cc { class AudioEngineImpl; class AudioPlayer; @@ -113,6 +113,6 @@ protected: friend class AudioPlayer; }; -NS_CC_END +} #endif diff --git a/native/cocos/audio/win32/AudioDecoder.cpp b/native/cocos/audio/win32/AudioDecoder.cpp index bc1c813d40..394388918c 100644 --- a/native/cocos/audio/win32/AudioDecoder.cpp +++ b/native/cocos/audio/win32/AudioDecoder.cpp @@ -29,7 +29,7 @@ #define LOG_TAG "AudioDecoder" -namespace cocos2d { +namespace cc { AudioDecoder::AudioDecoder() : _isOpened(false) @@ -89,4 +89,4 @@ AudioDecoder::AudioDecoder() return _channelCount; } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/win32/AudioDecoder.h b/native/cocos/audio/win32/AudioDecoder.h index ab3d03097e..536735ca16 100644 --- a/native/cocos/audio/win32/AudioDecoder.h +++ b/native/cocos/audio/win32/AudioDecoder.h @@ -29,7 +29,7 @@ #include "vorbis/vorbisfile.h" -namespace cocos2d { +namespace cc { /** * @brief The class for decoding compressed audio file to PCM buffer. @@ -117,4 +117,4 @@ protected: friend class AudioDecoderManager; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/win32/AudioDecoderManager.cpp b/native/cocos/audio/win32/AudioDecoderManager.cpp index fc814e13d6..5568f13c73 100644 --- a/native/cocos/audio/win32/AudioDecoderManager.cpp +++ b/native/cocos/audio/win32/AudioDecoderManager.cpp @@ -32,7 +32,7 @@ THE SOFTWARE. #include "platform/CCFileUtils.h" #include "mpg123/mpg123.h" -namespace cocos2d { +namespace cc { static bool __mp3Inited = false; @@ -66,5 +66,5 @@ void AudioDecoderManager::destroyDecoder(AudioDecoder* decoder) delete decoder; } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/win32/AudioDecoderManager.h b/native/cocos/audio/win32/AudioDecoderManager.h index 89fbc3c19c..d4ffef785b 100644 --- a/native/cocos/audio/win32/AudioDecoderManager.h +++ b/native/cocos/audio/win32/AudioDecoderManager.h @@ -25,7 +25,7 @@ THE SOFTWARE. #pragma once -namespace cocos2d { +namespace cc { class AudioDecoder; @@ -38,5 +38,5 @@ public: static void destroyDecoder(AudioDecoder* decoder); }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/win32/AudioDecoderMp3.cpp b/native/cocos/audio/win32/AudioDecoderMp3.cpp index b4da842822..b46a45bff8 100644 --- a/native/cocos/audio/win32/AudioDecoderMp3.cpp +++ b/native/cocos/audio/win32/AudioDecoderMp3.cpp @@ -31,7 +31,7 @@ #define LOG_TAG "AudioDecoderMp3" -namespace cocos2d { +namespace cc { static bool __mp3Inited = false; @@ -180,4 +180,4 @@ namespace cocos2d { return static_cast(mpg123_tell(_mpg123handle)); } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/win32/AudioDecoderMp3.h b/native/cocos/audio/win32/AudioDecoderMp3.h index e23f40f273..491f75f032 100644 --- a/native/cocos/audio/win32/AudioDecoderMp3.h +++ b/native/cocos/audio/win32/AudioDecoderMp3.h @@ -29,7 +29,7 @@ struct mpg123_handle_struct; -namespace cocos2d { +namespace cc { /** * @brief The class for decoding compressed audio file to PCM buffer. @@ -83,4 +83,4 @@ protected: friend class AudioDecoderManager; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/win32/AudioDecoderOgg.cpp b/native/cocos/audio/win32/AudioDecoderOgg.cpp index 60d32b84bc..dc8a8c0da0 100644 --- a/native/cocos/audio/win32/AudioDecoderOgg.cpp +++ b/native/cocos/audio/win32/AudioDecoderOgg.cpp @@ -29,7 +29,7 @@ #define LOG_TAG "AudioDecoderOgg" -namespace cocos2d { +namespace cc { AudioDecoderOgg::AudioDecoderOgg() { @@ -84,4 +84,4 @@ namespace cocos2d { return static_cast(ov_pcm_tell(const_cast(&_vf))); } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/win32/AudioDecoderOgg.h b/native/cocos/audio/win32/AudioDecoderOgg.h index 6f5b55db06..e11a932110 100644 --- a/native/cocos/audio/win32/AudioDecoderOgg.h +++ b/native/cocos/audio/win32/AudioDecoderOgg.h @@ -29,7 +29,7 @@ #include "vorbis/vorbisfile.h" -namespace cocos2d { +namespace cc { /** * @brief The class for decoding compressed audio file to PCM buffer. @@ -79,4 +79,4 @@ protected: friend class AudioDecoderManager; }; -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/audio/win32/AudioEngine-win32.cpp b/native/cocos/audio/win32/AudioEngine-win32.cpp index 6cd5db8a4b..341afeb1ef 100644 --- a/native/cocos/audio/win32/AudioEngine-win32.cpp +++ b/native/cocos/audio/win32/AudioEngine-win32.cpp @@ -104,7 +104,7 @@ void audioLog(const char * format, ...) va_end(args); } -using namespace cocos2d; +using namespace cc; static ALCdevice *s_ALDevice = nullptr; static ALCcontext *s_ALContext = nullptr; diff --git a/native/cocos/audio/win32/AudioEngine-win32.h b/native/cocos/audio/win32/AudioEngine-win32.h index df7fa03a96..86084ad434 100644 --- a/native/cocos/audio/win32/AudioEngine-win32.h +++ b/native/cocos/audio/win32/AudioEngine-win32.h @@ -35,13 +35,13 @@ #include "audio/win32/AudioCache.h" #include "audio/win32/AudioPlayer.h" -NS_CC_BEGIN +namespace cc { class Scheduler; #define MAX_AUDIOINSTANCES 32 -class CC_DLL AudioEngineImpl : public cocos2d::Ref +class CC_DLL AudioEngineImpl : public cc::Ref { public: AudioEngineImpl(); @@ -86,7 +86,7 @@ private: int _currentAudioID; std::weak_ptr _scheduler; }; -NS_CC_END +} #endif // __AUDIO_ENGINE_INL_H_ #endif diff --git a/native/cocos/audio/win32/AudioPlayer.cpp b/native/cocos/audio/win32/AudioPlayer.cpp index 57a0f31c69..7805aec636 100644 --- a/native/cocos/audio/win32/AudioPlayer.cpp +++ b/native/cocos/audio/win32/AudioPlayer.cpp @@ -41,7 +41,7 @@ #define ALOGVV(...) do{} while(false) #endif -using namespace cocos2d; +using namespace cc; namespace { unsigned int __idIndex = 0; diff --git a/native/cocos/audio/win32/AudioPlayer.h b/native/cocos/audio/win32/AudioPlayer.h index 4311f80349..79195f3f0b 100644 --- a/native/cocos/audio/win32/AudioPlayer.h +++ b/native/cocos/audio/win32/AudioPlayer.h @@ -40,7 +40,7 @@ #endif #include "base/ccMacros.h" -NS_CC_BEGIN +namespace cc { class AudioCache; class AudioEngineImpl; @@ -91,7 +91,7 @@ protected: friend class AudioEngineImpl; }; -NS_CC_END +} #endif //CC_PLATFORM == CC_PLATFORM_WINDOWS diff --git a/native/cocos/base/CCAutoreleasePool.cpp b/native/cocos/base/CCAutoreleasePool.cpp index ed2c63ee06..58d593b638 100644 --- a/native/cocos/base/CCAutoreleasePool.cpp +++ b/native/cocos/base/CCAutoreleasePool.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "base/CCAutoreleasePool.h" #include "base/ccMacros.h" -NS_CC_BEGIN +namespace cc { AutoreleasePool::AutoreleasePool() : _name("") @@ -168,4 +168,4 @@ void PoolManager::pop() _releasePoolStack.pop_back(); } -NS_CC_END +} diff --git a/native/cocos/base/CCAutoreleasePool.h b/native/cocos/base/CCAutoreleasePool.h index cf46e1f5d2..bc438ea724 100644 --- a/native/cocos/base/CCAutoreleasePool.h +++ b/native/cocos/base/CCAutoreleasePool.h @@ -34,7 +34,7 @@ THE SOFTWARE. * @addtogroup base * @{ */ -NS_CC_BEGIN +namespace cc { /** @@ -183,6 +183,6 @@ private: * @endcond */ -NS_CC_END +} #endif //__AUTORELEASEPOOL_H__ diff --git a/native/cocos/base/CCData.cpp b/native/cocos/base/CCData.cpp index 1fe872f1c0..1e2f92790c 100644 --- a/native/cocos/base/CCData.cpp +++ b/native/cocos/base/CCData.cpp @@ -26,7 +26,7 @@ #include "base/CCData.h" -NS_CC_BEGIN +namespace cc { const Data Data::Null; @@ -136,4 +136,4 @@ unsigned char* Data::takeBuffer(ssize_t* size) return buffer; } -NS_CC_END +} diff --git a/native/cocos/base/CCData.h b/native/cocos/base/CCData.h index 93c61db669..b55f707229 100644 --- a/native/cocos/base/CCData.h +++ b/native/cocos/base/CCData.h @@ -36,7 +36,7 @@ * @js NA * @lua NA */ -NS_CC_BEGIN +namespace cc { class CC_DLL Data { @@ -150,7 +150,7 @@ private: }; -NS_CC_END +} /** @} */ #endif // __CCDATA_H__ diff --git a/native/cocos/base/CCLog.cpp b/native/cocos/base/CCLog.cpp index 7c5f920ce3..81578b62a3 100644 --- a/native/cocos/base/CCLog.cpp +++ b/native/cocos/base/CCLog.cpp @@ -99,12 +99,12 @@ namespace fflush(stdout); #endif - //cocos2d::log(buf); + //cc::log(buf); delete [] buf; } } -namespace cocos2d +namespace cc { void log(const char * format, ...) diff --git a/native/cocos/base/CCLog.h b/native/cocos/base/CCLog.h index 5956d374f7..0dee8e8007 100644 --- a/native/cocos/base/CCLog.h +++ b/native/cocos/base/CCLog.h @@ -50,7 +50,7 @@ #define CC_FORMAT_PRINTF(formatPos, argPos) #endif -namespace cocos2d +namespace cc { //TODO: add CC_DLL back diff --git a/native/cocos/base/CCMap.h b/native/cocos/base/CCMap.h index 39bd5f04de..9b59d6d55f 100644 --- a/native/cocos/base/CCMap.h +++ b/native/cocos/base/CCMap.h @@ -42,7 +42,7 @@ * @addtogroup base * @{ */ -NS_CC_BEGIN +namespace cc { /** * Similar to std::unordered_map, but it will manage reference count automatically internally. @@ -89,7 +89,7 @@ public: Map() : _data() { - static_assert(std::is_convertible::value, "Invalid Type for cocos2d::Map!"); + static_assert(std::is_convertible::value, "Invalid Type for cc::Map!"); CCLOGINFO("In the default constructor of Map!"); } @@ -97,7 +97,7 @@ public: explicit Map(ssize_t capacity) : _data() { - static_assert(std::is_convertible::value, "Invalid Type for cocos2d::Map!"); + static_assert(std::is_convertible::value, "Invalid Type for cc::Map!"); CCLOGINFO("In the constructor with capacity of Map!"); _data.reserve(capacity); } @@ -105,7 +105,7 @@ public: /** Copy constructor. */ Map(const Map& other) { - static_assert(std::is_convertible::value, "Invalid Type for cocos2d::Map!"); + static_assert(std::is_convertible::value, "Invalid Type for cc::Map!"); CCLOGINFO("In the copy constructor of Map!"); _data = other._data; addRefForAllObjects(); @@ -114,7 +114,7 @@ public: /** Move constructor. */ Map(Map&& other) { - static_assert(std::is_convertible::value, "Invalid Type for cocos2d::Map!"); + static_assert(std::is_convertible::value, "Invalid Type for cc::Map!"); CCLOGINFO("In the move constructor of Map!"); _data = std::move(other._data); } @@ -417,6 +417,6 @@ protected: }; -NS_CC_END +} // end group /// @} diff --git a/native/cocos/base/CCRef.cpp b/native/cocos/base/CCRef.cpp index 45c6321c3f..0356ab0d68 100644 --- a/native/cocos/base/CCRef.cpp +++ b/native/cocos/base/CCRef.cpp @@ -32,7 +32,7 @@ THE SOFTWARE. #include // std::find #endif -NS_CC_BEGIN +namespace cc { #if CC_REF_LEAK_DETECTION static void trackRef(Ref* ref); @@ -168,4 +168,4 @@ static void untrackRef(Ref* ref) #endif // #if CC_REF_LEAK_DETECTION -NS_CC_END +} diff --git a/native/cocos/base/CCRef.h b/native/cocos/base/CCRef.h index 348ef74cb5..fb9969cb25 100644 --- a/native/cocos/base/CCRef.h +++ b/native/cocos/base/CCRef.h @@ -36,7 +36,7 @@ THE SOFTWARE. * @addtogroup base * @{ */ -NS_CC_BEGIN +namespace cc { class Ref; @@ -146,7 +146,7 @@ public: }; -NS_CC_END +} // end of base group /** @} */ diff --git a/native/cocos/base/CCRefPtr.h b/native/cocos/base/CCRefPtr.h index cf7d998238..44e65c06f3 100644 --- a/native/cocos/base/CCRefPtr.h +++ b/native/cocos/base/CCRefPtr.h @@ -33,7 +33,7 @@ #include #include -NS_CC_BEGIN +namespace cc { /** * Utility/support macros. Defined to enable RefPtr to contain types like 'const T' because we do not @@ -74,7 +74,7 @@ NS_CC_BEGIN } while (0); /** - * Wrapper class which maintains a strong reference to a cocos2dx cocos2d::Ref* type object. + * Wrapper class which maintains a strong reference to a cocos2dx cc::Ref* type object. * Similar in concept to a boost smart pointer. * * Enables the use of the RAII idiom with Cocos2dx objects and helps automate some of the more @@ -250,12 +250,12 @@ public: * where the RefPtr has the initial ownership of the object. * * E.G: - * RefPtr image; - * image.weakAssign(new cocos2d::Image()); + * RefPtr image; + * image.weakAssign(new cc::Image()); * * Instead of: - * RefPtr image; - * image = new cocos2d::Image(); + * RefPtr image; + * image = new cc::Image(); * image->release(); // Required because new'd object already has a reference count of '1'. */ inline void weakAssign(const RefPtr & other) @@ -267,7 +267,7 @@ public: private: T * _ptr; - // NOTE: We can ensure T is derived from cocos2d::Ref at compile time here. + // NOTE: We can ensure T is derived from cc::Ref at compile time here. static_assert(std::is_base_of::type>::value, "T must be derived from Ref"); }; @@ -342,7 +342,7 @@ template RefPtr dynamic_pointer_cast(const RefPtr & r) #undef CC_REF_PTR_SAFE_RELEASE #undef CC_REF_PTR_SAFE_RELEASE_NULL -NS_CC_END +} /// @endcond #endif // __CC_REF_PTR_H__ diff --git a/native/cocos/base/CCScheduler.cpp b/native/cocos/base/CCScheduler.cpp index a8d58f1750..e4eb43a1a9 100644 --- a/native/cocos/base/CCScheduler.cpp +++ b/native/cocos/base/CCScheduler.cpp @@ -32,7 +32,7 @@ THE SOFTWARE. #define CC_REPEAT_FOREVER (UINT_MAX -1) -NS_CC_BEGIN +namespace cc { // data structures @@ -520,4 +520,4 @@ void Scheduler::update(float dt) } } -NS_CC_END +} diff --git a/native/cocos/base/CCScheduler.h b/native/cocos/base/CCScheduler.h index 177d759505..c9422fd4e6 100644 --- a/native/cocos/base/CCScheduler.h +++ b/native/cocos/base/CCScheduler.h @@ -35,7 +35,7 @@ THE SOFTWARE. #include "base/CCVector.h" #include "base/uthash.h" -NS_CC_BEGIN +namespace cc { class Scheduler; @@ -309,4 +309,4 @@ private: // end of base group /** @} */ -NS_CC_END +} diff --git a/native/cocos/base/CCThreadPool.cpp b/native/cocos/base/CCThreadPool.cpp index 7dd4ee0c50..82fc3f2ba8 100644 --- a/native/cocos/base/CCThreadPool.cpp +++ b/native/cocos/base/CCThreadPool.cpp @@ -40,7 +40,7 @@ #define TIME_MINUS(now, prev) (std::chrono::duration_cast((now) - (prev)).count() / 1000.0f) -namespace cocos2d { +namespace cc { #define DEFAULT_THREAD_POOL_MIN_NUM (4) #define DEFAULT_THREAD_POOL_MAX_NUM (20) @@ -433,4 +433,4 @@ void ThreadPool::setThread(int tid) new(std::nothrow) std::thread(f)); // compiler may not support std::make_unique() } -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/base/CCThreadPool.h b/native/cocos/base/CCThreadPool.h index 0f958bd612..c39b3e6240 100644 --- a/native/cocos/base/CCThreadPool.h +++ b/native/cocos/base/CCThreadPool.h @@ -38,7 +38,7 @@ #include #include -namespace cocos2d { +namespace cc { /** * @addtogroup base @@ -234,4 +234,4 @@ private: // end of base group /// @} -} // namespace cocos2d { +} // namespace cc { diff --git a/native/cocos/base/CCValue.cpp b/native/cocos/base/CCValue.cpp index 1829348417..9c14ea8841 100644 --- a/native/cocos/base/CCValue.cpp +++ b/native/cocos/base/CCValue.cpp @@ -34,7 +34,7 @@ #include -NS_CC_BEGIN +namespace cc { const ValueVector ValueVectorNull; const ValueMap ValueMapNull; @@ -936,5 +936,5 @@ void Value::reset(Type type) _type = type; } -NS_CC_END +} diff --git a/native/cocos/base/CCValue.h b/native/cocos/base/CCValue.h index 707c312504..142c7fc586 100644 --- a/native/cocos/base/CCValue.h +++ b/native/cocos/base/CCValue.h @@ -37,7 +37,7 @@ * @{ */ -NS_CC_BEGIN +namespace cc { class Value; @@ -247,7 +247,7 @@ private: /** @} */ -NS_CC_END +} #endif /* defined(__cocos2d_libs__CCValue__) */ diff --git a/native/cocos/base/CCVector.h b/native/cocos/base/CCVector.h index c14bcafade..0eedabf9bc 100644 --- a/native/cocos/base/CCVector.h +++ b/native/cocos/base/CCVector.h @@ -38,7 +38,7 @@ THE SOFTWARE. * @addtogroup base * @{ */ -NS_CC_BEGIN +namespace cc { /* * Similar to std::vector, but it will manage reference count automatically internally. @@ -112,7 +112,7 @@ public: Vector() : _data() { - static_assert(std::is_convertible::value, "Invalid Type for cocos2d::Vector!"); + static_assert(std::is_convertible::value, "Invalid Type for cc::Vector!"); } /** @@ -122,7 +122,7 @@ public: explicit Vector(ssize_t capacity) : _data() { - static_assert(std::is_convertible::value, "Invalid Type for cocos2d::Vector!"); + static_assert(std::is_convertible::value, "Invalid Type for cc::Vector!"); CCLOGINFO("In the default constructor with capacity of Vector."); reserve(capacity); } @@ -146,7 +146,7 @@ public: /** Copy constructor. */ Vector(const Vector& other) { - static_assert(std::is_convertible::value, "Invalid Type for cocos2d::Vector!"); + static_assert(std::is_convertible::value, "Invalid Type for cc::Vector!"); CCLOGINFO("In the copy constructor!"); _data = other._data; addRefForAllObjects(); @@ -155,7 +155,7 @@ public: /** Constructor with std::move semantic. */ Vector(Vector&& other) { - static_assert(std::is_convertible::value, "Invalid Type for cocos2d::Vector!"); + static_assert(std::is_convertible::value, "Invalid Type for cc::Vector!"); CCLOGINFO("In the move constructor of Vector!"); _data = std::move(other._data); } @@ -516,4 +516,4 @@ protected: // end of base group /** @} */ -NS_CC_END +} diff --git a/native/cocos/base/ZipUtils.cpp b/native/cocos/base/ZipUtils.cpp index 493d079fe7..fff587b86d 100644 --- a/native/cocos/base/ZipUtils.cpp +++ b/native/cocos/base/ZipUtils.cpp @@ -47,7 +47,7 @@ #define unzGoToNextFile64(A,B,C,D) unzGoToNextFile2(A,B,C,D, NULL, 0, NULL, 0) #endif -NS_CC_BEGIN +namespace cc { unsigned int ZipUtils::s_uEncryptedPvrKeyParts[4] = {0,0,0,0}; unsigned int ZipUtils::s_uEncryptionKey[1024]; @@ -715,4 +715,4 @@ bool ZipFile::initWithBuffer(const void *buffer, uLong size) return true; } -NS_CC_END +} diff --git a/native/cocos/base/ZipUtils.h b/native/cocos/base/ZipUtils.h index ce857c94e4..20e1ff082f 100644 --- a/native/cocos/base/ZipUtils.h +++ b/native/cocos/base/ZipUtils.h @@ -44,7 +44,7 @@ THE SOFTWARE. * @{ */ -namespace cocos2d +namespace cc { #ifndef _unz64_H typedef struct unz_file_info_s unz_file_info; @@ -288,7 +288,7 @@ typedef struct unz_file_info_s unz_file_info; /** Internal data like zip file pointer / file list array and so on */ ZipFilePrivate *_data; }; -} // end of namespace cocos2d +} // end of namespace cc // end group /// @} diff --git a/native/cocos/base/base64.cpp b/native/cocos/base/base64.cpp index f22a11aa45..2c3b39b1a9 100644 --- a/native/cocos/base/base64.cpp +++ b/native/cocos/base/base64.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include #include "base/base64.h" -namespace cocos2d { +namespace cc { unsigned char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff --git a/native/cocos/base/base64.h b/native/cocos/base/base64.h index f41939916f..fb706883a6 100644 --- a/native/cocos/base/base64.h +++ b/native/cocos/base/base64.h @@ -34,7 +34,7 @@ THE SOFTWARE. extern "C" { #endif -namespace cocos2d { +namespace cc { /** @file base64 helper functions diff --git a/native/cocos/base/ccCArray.cpp b/native/cocos/base/ccCArray.cpp index 0f45141979..3a4cea3ecf 100644 --- a/native/cocos/base/ccCArray.cpp +++ b/native/cocos/base/ccCArray.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include "base/ccCArray.h" -NS_CC_BEGIN +namespace cc { /** Allocates and initializes a new array with specified capacity */ ccArray* ccArrayNew(ssize_t capacity) @@ -470,5 +470,5 @@ void ccCArrayFullRemoveArray(ccCArray *arr, ccCArray *minusArr) arr->num -= back; } -NS_CC_END +} diff --git a/native/cocos/base/ccCArray.h b/native/cocos/base/ccCArray.h index 24c2d5cebb..defc590a80 100644 --- a/native/cocos/base/ccCArray.h +++ b/native/cocos/base/ccCArray.h @@ -52,7 +52,7 @@ THE SOFTWARE. #include #include -NS_CC_BEGIN +namespace cc { // Easy integration #define CCARRAYDATA_FOREACH(__array__, __object__) \ @@ -203,7 +203,7 @@ void ccCArrayRemoveArray(ccCArray *arr, ccCArray *minusArr); */ void ccCArrayFullRemoveArray(ccCArray *arr, ccCArray *minusArr); -NS_CC_END +} /// @endcond #endif // CC_ARRAY_H diff --git a/native/cocos/base/ccConfig.h b/native/cocos/base/ccConfig.h index 5f55db89b0..f2825fb5cc 100644 --- a/native/cocos/base/ccConfig.h +++ b/native/cocos/base/ccConfig.h @@ -42,10 +42,6 @@ THE SOFTWARE. #define USE_VIDEO 1 #endif -#ifndef USE_WEB_VIEW -#define USE_WEB_VIEW 1 -#endif - #ifndef USE_AUDIO #define USE_AUDIO 1 #endif diff --git a/native/cocos/base/ccMacros.h b/native/cocos/base/ccMacros.h index f70c26c792..8293e66451 100644 --- a/native/cocos/base/ccMacros.h +++ b/native/cocos/base/ccMacros.h @@ -80,7 +80,7 @@ typedef SSIZE_T ssize_t; // #define CCASSERT(cond, msg) do { \ // if (!(cond)) { \ // if (!cc_assert_script_compatible(msg) && strlen(msg)) \ - // cocos2d::log("Assert failed: %s", msg); \ + // cc::log("Assert failed: %s", msg); \ // CC_ASSERT(cond); \ // } \ // } while (0) @@ -132,22 +132,12 @@ It should work same as apples CFSwapInt32LittleToHost(..) // Generic macros -/// @name namespace cocos2d +/// @name namespace cc /// @{ #ifdef __cplusplus - #define NS_CC_BEGIN namespace cocos2d { - #define NS_CC_END } - #define USING_NS_CC using namespace cocos2d - #define NS_CC ::cocos2d - #define NS_PP_BEGIN namespace pipeline { #define NS_PP_END } #else - #define NS_CC_BEGIN - #define NS_CC_END - #define USING_NS_CC - #define NS_CC - #define NS_PP_BEGIN #define NS_PP_END #endif @@ -196,7 +186,7 @@ It should work same as apples CFSwapInt32LittleToHost(..) if (cond) break #define __CCLOGWITHFUNCTION(s, ...) \ - cocos2d::log("%s : %s", __FUNCTION__, cocos2d::StringUtils::format(s, ##__VA_ARGS__).c_str()) + cc::log("%s : %s", __FUNCTION__, cc::StringUtils::format(s, ##__VA_ARGS__).c_str()) /// @name Cocos2d debug /// @{ @@ -217,7 +207,7 @@ It should work same as apples CFSwapInt32LittleToHost(..) #elif COCOS2D_DEBUG == 1 #if (CC_PLATFORM == CC_PLATFORM_ANDROID) - #define COCOS_LOG_TAG "cocos2d-x" + #define COCOS_LOG_TAG "cocos" #define CCLOG(...) __android_log_print(ANDROID_LOG_DEBUG, COCOS_LOG_TAG, __VA_ARGS__) #define CCLOGINFO(format, ...) \ do { \ @@ -225,8 +215,8 @@ It should work same as apples CFSwapInt32LittleToHost(..) #define CCLOGWARN(...) __android_log_print(ANDROID_LOG_WARN, COCOS_LOG_TAG, __VA_ARGS__) #define CCLOGERROR(...) __android_log_print(ANDROID_LOG_ERROR, COCOS_LOG_TAG, __VA_ARGS__) #else - #define CCLOG(format, ...) cocos2d::log(format, ##__VA_ARGS__) - #define CCLOGERROR(format, ...) cocos2d::log(format, ##__VA_ARGS__) + #define CCLOG(format, ...) cc::log(format, ##__VA_ARGS__) + #define CCLOGERROR(format, ...) cc::log(format, ##__VA_ARGS__) #define CCLOGINFO(format, ...) \ do { \ } while (0) @@ -234,9 +224,9 @@ It should work same as apples CFSwapInt32LittleToHost(..) #endif #elif COCOS2D_DEBUG > 1 - #define CCLOG(format, ...) cocos2d::log(format, ##__VA_ARGS__) - #define CCLOGERROR(format, ...) cocos2d::log(format, ##__VA_ARGS__) - #define CCLOGINFO(format, ...) cocos2d::log(format, ##__VA_ARGS__) + #define CCLOG(format, ...) cc::log(format, ##__VA_ARGS__) + #define CCLOGERROR(format, ...) cc::log(format, ##__VA_ARGS__) + #define CCLOGINFO(format, ...) cc::log(format, ##__VA_ARGS__) #define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__) #endif // COCOS2D_DEBUG diff --git a/native/cocos/base/ccRandom.h b/native/cocos/base/ccRandom.h index a0ea7ce323..1479d25e2e 100644 --- a/native/cocos/base/ccRandom.h +++ b/native/cocos/base/ccRandom.h @@ -36,7 +36,7 @@ THE SOFTWARE. * @addtogroup base * @{ */ -NS_CC_BEGIN +namespace cc { /** @@ -93,7 +93,7 @@ inline double random(double min, double max) { * Returns a random int between 0 and RAND_MAX. */ inline int random() { - return cocos2d::random(0, RAND_MAX); + return cc::random(0, RAND_MAX); }; /** @@ -107,7 +107,7 @@ inline float rand_minus1_1() { // be seeded using std::srand() return ((std::rand() / (float)RAND_MAX) * 2) -1; -// return cocos2d::random(-1.f, 1.f); +// return cc::random(-1.f, 1.f); }; /** @@ -121,11 +121,11 @@ inline float rand_0_1() { // be seeded using std::srand() return std::rand() / (float)RAND_MAX; -// return cocos2d::random(0.f, 1.f); +// return cc::random(0.f, 1.f); }; -NS_CC_END +} // end group /// @} #endif //__ccRandom_H_ diff --git a/native/cocos/base/ccUTF8.cpp b/native/cocos/base/ccUTF8.cpp index 82726e6d2d..0e9843424b 100644 --- a/native/cocos/base/ccUTF8.cpp +++ b/native/cocos/base/ccUTF8.cpp @@ -30,7 +30,7 @@ #include #include -NS_CC_BEGIN +namespace cc { namespace StringUtils { @@ -254,7 +254,7 @@ std::string getStringUTFCharsJNI(JNIEnv* env, jstring srcjStr, bool* ret) jstring newStringUTFJNI(JNIEnv* env, const std::string& utf8Str, bool* ret) { std::u16string utf16Str; - bool flag = cocos2d::StringUtils::UTF8ToUTF16(utf8Str, utf16Str); + bool flag = cc::StringUtils::UTF8ToUTF16(utf8Str, utf16Str); if (ret) { @@ -378,4 +378,4 @@ bool StringUTF8::insert(std::size_t pos, const StringUTF8& insertStr) } //namespace StringUtils { -NS_CC_END +} diff --git a/native/cocos/base/ccUTF8.h b/native/cocos/base/ccUTF8.h index 0659da6a0a..5f205260ac 100644 --- a/native/cocos/base/ccUTF8.h +++ b/native/cocos/base/ccUTF8.h @@ -36,7 +36,7 @@ #include "platform/android/jni/JniHelper.h" #endif -NS_CC_BEGIN +namespace cc { namespace StringUtils { @@ -217,6 +217,6 @@ private: } // namespace StringUtils { -NS_CC_END +} #endif /** defined(__cocos2dx__ccUTF8__) */ diff --git a/native/cocos/base/ccUtils.cpp b/native/cocos/base/ccUtils.cpp index 62e64a0d24..71348819f6 100644 --- a/native/cocos/base/ccUtils.cpp +++ b/native/cocos/base/ccUtils.cpp @@ -35,7 +35,7 @@ THE SOFTWARE. #include #include -NS_CC_BEGIN +namespace cc { namespace utils @@ -76,4 +76,4 @@ int nextPOT(int x) } -NS_CC_END +} diff --git a/native/cocos/base/ccUtils.h b/native/cocos/base/ccUtils.h index 0b96f59612..372747e2fe 100644 --- a/native/cocos/base/ccUtils.h +++ b/native/cocos/base/ccUtils.h @@ -33,7 +33,7 @@ THE SOFTWARE. Misc free functions */ -NS_CC_BEGIN +namespace cc { /* @@ -64,5 +64,5 @@ namespace utils } -NS_CC_END +} diff --git a/native/cocos/cocos2d.cpp b/native/cocos/cocos2d.cpp index 5dae6b8b59..f724ce952b 100644 --- a/native/cocos/cocos2d.cpp +++ b/native/cocos/cocos2d.cpp @@ -28,12 +28,12 @@ THE SOFTWARE. #include "base/ccMacros.h" -NS_CC_BEGIN +namespace cc { CC_DLL const char* cocos2dVersion() { return "2.0.x"; } -NS_CC_END +} diff --git a/native/cocos/cocos2d.h b/native/cocos/cocos2d.h index 77a4c8b9a3..5245de16e9 100644 --- a/native/cocos/cocos2d.h +++ b/native/cocos/cocos2d.h @@ -78,11 +78,11 @@ THE SOFTWARE. #include "platform/CCCanvasRenderingContext2D.h" -NS_CC_BEGIN +namespace cc { CC_DLL const char* cocos2dVersion(); -NS_CC_END +} #endif // __COCOS2D_H__ diff --git a/native/cocos/math/CCGeometry.cpp b/native/cocos/math/CCGeometry.cpp index 384a8fc2a3..8c8ac66c7a 100644 --- a/native/cocos/math/CCGeometry.cpp +++ b/native/cocos/math/CCGeometry.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include "base/ccMacros.h" // implementation of Vec2 -NS_CC_BEGIN +namespace cc { // implementation of Size @@ -194,7 +194,7 @@ bool Rect::intersectsRect(const Rect& rect) const rect.getMaxY() < getMinY()); } -bool Rect::intersectsCircle(const cocos2d::Vec2 ¢er, float radius) const +bool Rect::intersectsCircle(const Vec2 ¢er, float radius) const { Vec2 rectangleCenter((origin.x + size.width / 2), (origin.y + size.height / 2)); @@ -279,4 +279,4 @@ Rect Rect::unionWithRect(const Rect & rect) const const Rect Rect::ZERO = Rect(0, 0, 0, 0); -NS_CC_END +} diff --git a/native/cocos/math/CCGeometry.h b/native/cocos/math/CCGeometry.h index 2ca95ed389..412599cee4 100644 --- a/native/cocos/math/CCGeometry.h +++ b/native/cocos/math/CCGeometry.h @@ -35,7 +35,7 @@ THE SOFTWARE. * @{ */ -NS_CC_BEGIN +namespace cc { class CC_DLL Size { @@ -215,7 +215,7 @@ public: static const Rect ZERO; }; -NS_CC_END +} // end of base group /// @} diff --git a/native/cocos/math/CCMathBase.h b/native/cocos/math/CCMathBase.h index 5561514572..d6e3ee3b18 100644 --- a/native/cocos/math/CCMathBase.h +++ b/native/cocos/math/CCMathBase.h @@ -60,9 +60,9 @@ //#define M_1_PI 0.31830988618379067154 #ifdef __cplusplus - #define NS_CC_MATH_BEGIN namespace cocos2d { + #define NS_CC_MATH_BEGIN namespace cc { #define NS_CC_MATH_END } - #define USING_NS_CC_MATH using namespace cocos2d + #define USING_NS_CC_MATH using namespace cc #else #define NS_CC_MATH_BEGIN #define NS_CC_MATH_END diff --git a/native/cocos/math/CCVertex.cpp b/native/cocos/math/CCVertex.cpp index c4be04ccc2..b3a50b9cc6 100644 --- a/native/cocos/math/CCVertex.cpp +++ b/native/cocos/math/CCVertex.cpp @@ -28,7 +28,7 @@ #include "math/CCVertex.h" #include "base/ccMacros.h" -NS_CC_BEGIN +namespace cc { void ccVertexLineToPolygon(Vec2 *points, float stroke, Vec2 *vertices, unsigned int offset, unsigned int nuPoints) { @@ -138,5 +138,5 @@ bool ccVertexLineIntersect(float Ax, float Ay, return true; } -NS_CC_END +} diff --git a/native/cocos/math/CCVertex.h b/native/cocos/math/CCVertex.h index f46c644353..37c841c2e9 100644 --- a/native/cocos/math/CCVertex.h +++ b/native/cocos/math/CCVertex.h @@ -35,7 +35,7 @@ * @{ */ -NS_CC_BEGIN +namespace cc { /** @file CCVertex.h */ @@ -48,7 +48,7 @@ bool CC_DLL ccVertexLineIntersect(float Ax, float Ay, float Cx, float Cy, float Dx, float Dy, float *T); -NS_CC_END +} // end of base group diff --git a/native/cocos/network/CCDownloader-android.cpp b/native/cocos/network/CCDownloader-android.cpp index ac020e7a1e..03e62eea4f 100644 --- a/native/cocos/network/CCDownloader-android.cpp +++ b/native/cocos/network/CCDownloader-android.cpp @@ -43,10 +43,10 @@ #endif #define JNI_DOWNLOADER(FUNC) JNI_METHOD1(ORG_DOWNLOADER_CLASS_NAME,FUNC) -std::unordered_map sDownloaderMap; +std::unordered_map sDownloaderMap; std::mutex sDownloaderMutex; -static void _insertDownloaderAndroid(int id, cocos2d::network::DownloaderAndroid* downloaderPtr) +static void _insertDownloaderAndroid(int id, cc::network::DownloaderAndroid* downloaderPtr) { std::lock_guard guard(sDownloaderMutex); sDownloaderMap.insert(std::make_pair(id, downloaderPtr)); @@ -61,7 +61,7 @@ static void _eraseDownloaderAndroid(int id) /** * If not found, return nullptr, otherwise return the Downloader */ -static cocos2d::network::DownloaderAndroid* _findDownloaderAndroid(int id) +static cc::network::DownloaderAndroid* _findDownloaderAndroid(int id) { std::lock_guard guard(sDownloaderMutex); auto iter = sDownloaderMap.find(id); @@ -72,7 +72,7 @@ static cocos2d::network::DownloaderAndroid* _findDownloaderAndroid(int id) } } -namespace cocos2d { namespace network { +namespace cc { namespace network { static int sTaskCounter = 0; static int sDownloaderCounter = 0; @@ -259,7 +259,7 @@ namespace cocos2d { namespace network { coTask->task.reset(); } } -} // namespace cocos2d::network +} // namespace cc::network extern "C" { @@ -268,7 +268,7 @@ JNIEXPORT void JNICALL JNI_DOWNLOADER(nativeOnProgress)(JNIEnv *env, jclass claz auto func = [=]() -> void { DLLOG("_nativeOnProgress(id: %d, taskId: %d, dl: %lld, dlnow: %lld, dltotal: %lld)", id, taskId, dl, dlnow, dltotal); //It's not thread-safe here, use thread-safe method instead - cocos2d::network::DownloaderAndroid *downloader = _findDownloaderAndroid(id); + cc::network::DownloaderAndroid *downloader = _findDownloaderAndroid(id); if (nullptr == downloader) { DLLOG("_nativeOnProgress can't find downloader by key: %p for task: %d", clazz, id); @@ -276,7 +276,7 @@ JNIEXPORT void JNICALL JNI_DOWNLOADER(nativeOnProgress)(JNIEnv *env, jclass claz } downloader->_onProcess((int)taskId, (int64_t)dl, (int64_t)dlnow, (int64_t)dltotal); }; - cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread(func); + cc::Application::getInstance()->getScheduler()->performFunctionInCocosThread(func); } JNIEXPORT void JNICALL JNI_DOWNLOADER(nativeOnFinish)(JNIEnv *env, jclass clazz, jint id, jint taskId, jint errCode, jstring errStr, jbyteArray data) @@ -284,7 +284,7 @@ JNIEXPORT void JNICALL JNI_DOWNLOADER(nativeOnFinish)(JNIEnv *env, jclass clazz, auto func = [=]() -> void { DLLOG("_nativeOnFinish(id: %d, taskId: %d)", id, taskId); //It's not thread-safe here, use thread-safe method instead - cocos2d::network::DownloaderAndroid *downloader = _findDownloaderAndroid(id); + cc::network::DownloaderAndroid *downloader = _findDownloaderAndroid(id); if (nullptr == downloader) { DLLOG("_nativeOnFinish can't find downloader id: %d for task: %d", id, taskId); @@ -312,7 +312,7 @@ JNIEXPORT void JNICALL JNI_DOWNLOADER(nativeOnFinish)(JNIEnv *env, jclass clazz, } downloader->_onFinish((int)taskId, (int)errCode, nullptr, buf); }; - cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread(func); + cc::Application::getInstance()->getScheduler()->performFunctionInCocosThread(func); } } // extern "C" { diff --git a/native/cocos/network/CCDownloader-android.h b/native/cocos/network/CCDownloader-android.h index d46914cff9..2de56f333e 100644 --- a/native/cocos/network/CCDownloader-android.h +++ b/native/cocos/network/CCDownloader-android.h @@ -29,7 +29,7 @@ class _jobject; -namespace cocos2d { namespace network +namespace cc { namespace network { class DownloadTaskAndroid; class DownloaderHints; @@ -52,5 +52,5 @@ namespace cocos2d { namespace network _jobject* _impl; std::unordered_map _taskMap; }; - }} // namespace cocos2d::network + }} // namespace cc::network diff --git a/native/cocos/network/CCDownloader-curl.cpp b/native/cocos/network/CCDownloader-curl.cpp index 3b0e730448..159861b752 100644 --- a/native/cocos/network/CCDownloader-curl.cpp +++ b/native/cocos/network/CCDownloader-curl.cpp @@ -42,7 +42,7 @@ #define CC_CURL_POLL_TIMEOUT_MS 50 #endif -namespace cocos2d { namespace network { +namespace cc { namespace network { using namespace std; //////////////////////////////////////////////////////////////////////////////// @@ -876,5 +876,5 @@ namespace cocos2d { namespace network { } } -}} // namespace cocos2d::network +}} // namespace cc::network diff --git a/native/cocos/network/CCDownloader-curl.h b/native/cocos/network/CCDownloader-curl.h index 3b010050b6..05ed1be772 100644 --- a/native/cocos/network/CCDownloader-curl.h +++ b/native/cocos/network/CCDownloader-curl.h @@ -27,11 +27,11 @@ #include "network/CCIDownloaderImpl.h" -namespace cocos2d { +namespace cc { class Scheduler; } -namespace cocos2d { namespace network +namespace cc { namespace network { class DownloadTaskCURL; class DownloaderHints; @@ -60,5 +60,5 @@ namespace cocos2d { namespace network std::weak_ptr _scheduler; }; -}} // namespace cocos2d::network +}} // namespace cc::network diff --git a/native/cocos/network/CCDownloader.cpp b/native/cocos/network/CCDownloader.cpp index 829cc0eb64..373ee87b93 100644 --- a/native/cocos/network/CCDownloader.cpp +++ b/native/cocos/network/CCDownloader.cpp @@ -44,7 +44,7 @@ #endif -namespace cocos2d { namespace network { +namespace cc { namespace network { DownloadTask::DownloadTask() { @@ -194,5 +194,5 @@ namespace cocos2d { namespace network { // return filename; //} -}} // namespace cocos2d::network +}} // namespace cc::network diff --git a/native/cocos/network/CCDownloader.h b/native/cocos/network/CCDownloader.h index 149fdaf3b8..8f8d2ac98b 100644 --- a/native/cocos/network/CCDownloader.h +++ b/native/cocos/network/CCDownloader.h @@ -34,7 +34,7 @@ #include "base/ccMacros.h" -namespace cocos2d { namespace network { +namespace cc { namespace network { class IDownloadTask; class IDownloaderImpl; @@ -116,5 +116,5 @@ namespace cocos2d { namespace network { std::unique_ptr _impl; }; -}} // namespace cocos2d::network +}} // namespace cc::network diff --git a/native/cocos/network/CCDownloaderImpl-apple.h b/native/cocos/network/CCDownloaderImpl-apple.h index ad4a33c868..d98b0c0cae 100644 --- a/native/cocos/network/CCDownloaderImpl-apple.h +++ b/native/cocos/network/CCDownloaderImpl-apple.h @@ -27,7 +27,7 @@ #include "network/CCIDownloaderImpl.h" -namespace cocos2d { namespace network +namespace cc { namespace network { class DownloaderHints; class DownloaderApple : public IDownloaderImpl @@ -43,5 +43,5 @@ namespace cocos2d { namespace network private: void* _impl; }; -}} // namespace cocos2d::network +}} // namespace cc::network diff --git a/native/cocos/network/CCDownloaderImpl-apple.mm b/native/cocos/network/CCDownloaderImpl-apple.mm index bc4259b525..a9e4f3a6de 100644 --- a/native/cocos/network/CCDownloaderImpl-apple.mm +++ b/native/cocos/network/CCDownloaderImpl-apple.mm @@ -37,15 +37,15 @@ // this wrapper used to wrap C++ class DownloadTask into NSMutableDictionary @interface DownloadTaskWrapper : NSObject { - std::shared_ptr _task; + std::shared_ptr _task; NSMutableArray *_dataArray; } // temp vars for dataTask: didReceivedData callback @property (nonatomic) int64_t bytesReceived; @property (nonatomic) int64_t totalBytesReceived; --(id)init:(std::shared_ptr&)t; --(const cocos2d::network::DownloadTask *)get; +-(id)init:(std::shared_ptr&)t; +-(const cc::network::DownloadTask *)get; -(void) addData:(NSData*) data; -(int64_t) transferDataToBuffer:(void*)buffer lengthOfBuffer:(int64_t)len; @@ -53,17 +53,17 @@ @interface DownloaderAppleImpl : NSObject { - const cocos2d::network::DownloaderApple *_outer; - cocos2d::network::DownloaderHints _hints; + const cc::network::DownloaderApple *_outer; + cc::network::DownloaderHints _hints; std::queue _taskQueue; } @property (nonatomic, strong) NSURLSession *downloadSession; @property (nonatomic, strong) NSMutableDictionary *taskDict; // ocTask: DownloadTaskWrapper --(id)init:(const cocos2d::network::DownloaderApple *)o hints:(const cocos2d::network::DownloaderHints&) hints; --(const cocos2d::network::DownloaderHints&)getHints; --(NSURLSessionDataTask *)createDataTask:(std::shared_ptr&) task; --(NSURLSessionDownloadTask *)createFileTask:(std::shared_ptr&) task; +-(id)init:(const cc::network::DownloaderApple *)o hints:(const cc::network::DownloaderHints&) hints; +-(const cc::network::DownloaderHints&)getHints; +-(NSURLSessionDataTask *)createDataTask:(std::shared_ptr&) task; +-(NSURLSessionDownloadTask *)createFileTask:(std::shared_ptr&) task; -(void)abort:(NSURLSessionTask *)task; -(void)doDestroy; @@ -72,7 +72,7 @@ //////////////////////////////////////////////////////////////////////////////// // C++ Classes Implementation -namespace cocos2d { namespace network { +namespace cc { namespace network { struct DownloadTaskApple : public IDownloadTask { DownloadTaskApple() @@ -121,17 +121,17 @@ namespace cocos2d { namespace network { void DownloaderApple::abort(const std::unique_ptr &task) { DLLOG("DownloaderApple:abort"); DeclareDownloaderImplVar; - cocos2d::network::DownloadTaskApple *downloadTask = (cocos2d::network::DownloadTaskApple *)task.get(); + cc::network::DownloadTaskApple *downloadTask = (cc::network::DownloadTaskApple *)task.get(); NSURLSessionTask *taskOC = downloadTask->dataTask ? downloadTask->dataTask : downloadTask->downloadTask; [impl abort:taskOC]; } -}} // namespace cocos2d::network +}} // namespace cc::network //////////////////////////////////////////////////////////////////////////////// // OC Classes Implementation @implementation DownloadTaskWrapper -- (id)init: (std::shared_ptr&)t +- (id)init: (std::shared_ptr&)t { DLLOG("Construct DonloadTaskWrapper %p", self); _dataArray = [NSMutableArray arrayWithCapacity:8]; @@ -140,7 +140,7 @@ namespace cocos2d { namespace network { return self; } --(const cocos2d::network::DownloadTask *)get +-(const cc::network::DownloadTask *)get { return _task.get(); } @@ -198,7 +198,7 @@ namespace cocos2d { namespace network { @implementation DownloaderAppleImpl -- (id)init: (const cocos2d::network::DownloaderApple*)o hints:(const cocos2d::network::DownloaderHints&) hints +- (id)init: (const cc::network::DownloaderApple*)o hints:(const cc::network::DownloaderHints&) hints { DLLOG("Construct DownloaderAppleImpl %p", self); // save outer task ref @@ -215,12 +215,12 @@ namespace cocos2d { namespace network { return self; } --(const cocos2d::network::DownloaderHints&)getHints +-(const cc::network::DownloaderHints&)getHints { return _hints; } --(NSURLSessionDataTask *)createDataTask:(std::shared_ptr&) task +-(NSURLSessionDataTask *)createDataTask:(std::shared_ptr&) task { const char *urlStr = task->requestURL.c_str(); DLLOG("DownloaderAppleImpl createDataTask: %s", urlStr); @@ -248,7 +248,7 @@ namespace cocos2d { namespace network { return ocTask; }; --(NSURLSessionDownloadTask *)createFileTask:(std::shared_ptr&) task +-(NSURLSessionDownloadTask *)createFileTask:(std::shared_ptr&) task { const char *urlStr = task->requestURL.c_str(); DLLOG("DownloaderAppleImpl createFileTask: %s", urlStr); @@ -469,12 +469,12 @@ namespace cocos2d { namespace network { NSString *errorMsg = error.localizedDescription; if (error.code == NSURLErrorCancelled) { //cancel - errorCode = cocos2d::network::DownloadTask::ERROR_ABORT; + errorCode = cc::network::DownloadTask::ERROR_ABORT; errorMsg = @"downloadFile:fail abort"; } std::vector buf; // just a placeholder _outer->onTaskFinish(*[wrapper get], - cocos2d::network::DownloadTask::ERROR_IMPL_INTERNAL, + cc::network::DownloadTask::ERROR_IMPL_INTERNAL, errorCode, [errorMsg cStringUsingEncoding:NSUTF8StringEncoding], buf); @@ -491,7 +491,7 @@ namespace cocos2d { namespace network { [wrapper transferDataToBuffer:buf lengthOfBuffer:buflen]; _outer->onTaskFinish(*[wrapper get], - cocos2d::network::DownloadTask::ERROR_NO_ERROR, + cc::network::DownloadTask::ERROR_NO_ERROR, 0, errorString, data); @@ -505,10 +505,10 @@ namespace cocos2d { namespace network { { std::vector buf; // just a placeholder const char *originalURL = [task.originalRequest.URL.absoluteString cStringUsingEncoding:NSUTF8StringEncoding]; - std::string errorMessage = cocos2d::StringUtils::format("Downloader: Failed to download %s with status code (%d)", originalURL, (int)statusCode); + std::string errorMessage = cc::StringUtils::format("Downloader: Failed to download %s with status code (%d)", originalURL, (int)statusCode); _outer->onTaskFinish(*[wrapper get], - cocos2d::network::DownloadTask::ERROR_IMPL_INTERNAL, + cc::network::DownloadTask::ERROR_IMPL_INTERNAL, 0, errorMessage, buf); @@ -647,7 +647,7 @@ namespace cocos2d { namespace network { [fileManager removeItemAtURL:destURL error:NULL]; // copy file to dest location - int errorCode = cocos2d::network::DownloadTask::ERROR_NO_ERROR; + int errorCode = cc::network::DownloadTask::ERROR_NO_ERROR; int errorCodeInternal = 0; std::string errorString; @@ -664,7 +664,7 @@ namespace cocos2d { namespace network { } else { - errorCode = cocos2d::network::DownloadTask::ERROR_FILE_OP_FAILED; + errorCode = cc::network::DownloadTask::ERROR_FILE_OP_FAILED; if (error) { errorCodeInternal = (int)error.code; diff --git a/native/cocos/network/CCIDownloaderImpl.h b/native/cocos/network/CCIDownloaderImpl.h index cbc9ce3776..9ef3aa20f7 100644 --- a/native/cocos/network/CCIDownloaderImpl.h +++ b/native/cocos/network/CCIDownloaderImpl.h @@ -35,12 +35,12 @@ THE SOFTWARE. //#define CC_DOWNLOADER_DEBUG #ifdef CC_DOWNLOADER_DEBUG -#define DLLOG(format, ...) cocos2d::log(format, ##__VA_ARGS__) +#define DLLOG(format, ...) cc::log(format, ##__VA_ARGS__) #else #define DLLOG(...) do {} while (0) #endif -namespace cocos2d { namespace network +namespace cc { namespace network { class DownloadTask; @@ -72,5 +72,5 @@ namespace cocos2d { namespace network virtual void abort(const std::unique_ptr& task) = 0; }; -}} // namespace cocos2d::network +}} // namespace cc::network diff --git a/native/cocos/network/HttpClient-android.cpp b/native/cocos/network/HttpClient-android.cpp index b3eb38de75..e2c8b1cdbb 100644 --- a/native/cocos/network/HttpClient-android.cpp +++ b/native/cocos/network/HttpClient-android.cpp @@ -45,7 +45,7 @@ #define JCLS_HTTPCLIENT "org/cocos2dx/lib/Cocos2dxHttpURLConnection" #endif -NS_CC_BEGIN +namespace cc { namespace network { @@ -643,7 +643,7 @@ private: { return nullptr; } - std::string strValue = cocos2d::StringUtils::getStringUTFCharsJNI(env, jstr); + std::string strValue = cc::StringUtils::getStringUTFCharsJNI(env, jstr); return strdup(strValue.c_str()); } @@ -1115,6 +1115,6 @@ const std::string& HttpClient::getSSLVerification() } -NS_CC_END +} #endif // #if (CC_PLATFORM == CC_PLATFORM_ANDROID) diff --git a/native/cocos/network/HttpClient-apple.mm b/native/cocos/network/HttpClient-apple.mm index 6263313f23..91215b7349 100644 --- a/native/cocos/network/HttpClient-apple.mm +++ b/native/cocos/network/HttpClient-apple.mm @@ -34,7 +34,7 @@ #include "platform/CCFileUtils.h" #include "platform/CCApplication.h" -NS_CC_BEGIN +namespace cc { namespace network { @@ -586,4 +586,4 @@ const std::string& HttpClient::getSSLVerification() } -NS_CC_END +} diff --git a/native/cocos/network/HttpClient.cpp b/native/cocos/network/HttpClient.cpp index 9d942443b7..3d75e2b1dd 100644 --- a/native/cocos/network/HttpClient.cpp +++ b/native/cocos/network/HttpClient.cpp @@ -33,7 +33,7 @@ #include "platform/CCApplication.h" #include "platform/CCStdC.h" -NS_CC_BEGIN +namespace cc { namespace network { @@ -631,6 +631,6 @@ const std::string& HttpClient::getSSLVerification() } -NS_CC_END +} diff --git a/native/cocos/network/HttpClient.h b/native/cocos/network/HttpClient.h index 2be87e9749..6561bb1052 100644 --- a/native/cocos/network/HttpClient.h +++ b/native/cocos/network/HttpClient.h @@ -41,7 +41,7 @@ * @{ */ -NS_CC_BEGIN +namespace cc { namespace network { @@ -211,7 +211,7 @@ private: } // namespace network -NS_CC_END +} // end group /// @} diff --git a/native/cocos/network/HttpCookie.cpp b/native/cocos/network/HttpCookie.cpp index ab90e21af4..0e7470a180 100644 --- a/native/cocos/network/HttpCookie.cpp +++ b/native/cocos/network/HttpCookie.cpp @@ -30,7 +30,7 @@ void HttpCookie::readFile() { - std::string inString = cocos2d::FileUtils::getInstance()->getStringFromFile(_cookieFileName); + std::string inString = cc::FileUtils::getInstance()->getStringFromFile(_cookieFileName); if(!inString.empty()) { std::vector cookiesVec; diff --git a/native/cocos/network/HttpRequest.h b/native/cocos/network/HttpRequest.h index 0a8060f2bb..a283eb4ed3 100644 --- a/native/cocos/network/HttpRequest.h +++ b/native/cocos/network/HttpRequest.h @@ -40,7 +40,7 @@ * @{ */ -NS_CC_BEGIN +namespace cc { namespace network { @@ -298,7 +298,7 @@ protected: } -NS_CC_END +} // end group /// @} diff --git a/native/cocos/network/HttpResponse.h b/native/cocos/network/HttpResponse.h index 38cef832eb..a77d603a47 100644 --- a/native/cocos/network/HttpResponse.h +++ b/native/cocos/network/HttpResponse.h @@ -34,7 +34,7 @@ * @{ */ -NS_CC_BEGIN +namespace cc { namespace network { @@ -44,7 +44,7 @@ namespace network { * @since v2.0.2. * @lua NA */ -class CC_DLL HttpResponse : public cocos2d::Ref +class CC_DLL HttpResponse : public cc::Ref { public: /** @@ -77,9 +77,9 @@ public: /** * Override autorelease method to prevent developers from calling it. * If this method is called , it would trigger CCASSERT. - * @return cocos2d::Ref* always return nullptr. + * @return cc::Ref* always return nullptr. */ - cocos2d::Ref* autorelease() + cc::Ref* autorelease() { CCASSERT(false, "HttpResponse is used between network thread and ui thread \ therefore, autorelease is forbidden here"); @@ -237,7 +237,7 @@ protected: } -NS_CC_END +} // end group /// @} diff --git a/native/cocos/network/SocketIO.cpp b/native/cocos/network/SocketIO.cpp index d356db97e9..faa74571ab 100644 --- a/native/cocos/network/SocketIO.cpp +++ b/native/cocos/network/SocketIO.cpp @@ -44,7 +44,7 @@ #include "json/stringbuffer.h" #include "json/writer.h" -NS_CC_BEGIN +namespace cc { namespace network { @@ -343,7 +343,7 @@ SocketIOPacket * SocketIOPacket::createPacketWithTypeIndex(int type, SocketIOPac * Clients/endpoints may share the same impl to accomplish multiplexing on the same websocket */ class SIOClientImpl : - public cocos2d::Ref, + public cc::Ref, public WebSocket::Delegate { private: @@ -1228,5 +1228,5 @@ void SocketIO::removeSocket(const std::string& uri) } -NS_CC_END +} diff --git a/native/cocos/network/SocketIO.h b/native/cocos/network/SocketIO.h index 719a3de542..de580b763c 100644 --- a/native/cocos/network/SocketIO.h +++ b/native/cocos/network/SocketIO.h @@ -70,7 +70,7 @@ in the onClose method the pointer should be set to NULL or used to connect to a * @{ */ -NS_CC_BEGIN +namespace cc { namespace network { @@ -179,7 +179,7 @@ private: static SocketIO *_inst; - cocos2d::Map _sockets; + cc::Map _sockets; SIOClientImpl* getSocket(const std::string& uri); void addSocket(const std::string& uri, SIOClientImpl* socket); @@ -201,7 +201,7 @@ typedef std::unordered_map EventRegistry; * @lua NA */ class CC_DLL SIOClient - : public cocos2d::Ref + : public cc::Ref { private: friend class SocketIO; // Only SocketIO class could contruct a SIOClient instance. @@ -294,7 +294,7 @@ public: } -NS_CC_END +} // end group /// @} diff --git a/native/cocos/network/Uri.cpp b/native/cocos/network/Uri.cpp index 3a18cf6d8f..02aca7ff19 100644 --- a/native/cocos/network/Uri.cpp +++ b/native/cocos/network/Uri.cpp @@ -63,7 +63,7 @@ void toLower(String& s) } // namespace -NS_CC_BEGIN +namespace cc { namespace network { @@ -374,4 +374,4 @@ std::string Uri::toString() const } // namespace network { -NS_CC_END +} diff --git a/native/cocos/network/Uri.h b/native/cocos/network/Uri.h index 74668ecd9f..aa59f14984 100644 --- a/native/cocos/network/Uri.h +++ b/native/cocos/network/Uri.h @@ -30,7 +30,7 @@ * @{ */ -NS_CC_BEGIN +namespace cc { namespace network { @@ -178,7 +178,7 @@ private: } // namespace network { -NS_CC_END +} // end group /// @} diff --git a/native/cocos/network/WebSocket-apple.mm b/native/cocos/network/WebSocket-apple.mm index 77cf994c49..f96a37b315 100644 --- a/native/cocos/network/WebSocket-apple.mm +++ b/native/cocos/network/WebSocket-apple.mm @@ -31,7 +31,7 @@ #error WebSocket must be compiled with ARC enabled #endif -static std::vector* __websocketInstances = nullptr; +static std::vector* __websocketInstances = nullptr; @interface WebSocketImpl : NSObject { @@ -44,20 +44,20 @@ static std::vector* __websocketInstances = nullptr @implementation WebSocketImpl { SRWebSocket* _ws; - cocos2d::network::WebSocket* _ccws; - cocos2d::network::WebSocket::Delegate* _delegate; + cc::network::WebSocket* _ccws; + cc::network::WebSocket::Delegate* _delegate; std::string _url; std::string _selectedProtocol; bool _isDestroyed; } --(id) initWithURL:(const std::string&) url protocols:(NSArray *)protocols allowsUntrustedSSLCertificates:(BOOL)allowsUntrustedSSLCertificates ws:(cocos2d::network::WebSocket*) ccws delegate:(const cocos2d::network::WebSocket::Delegate&) delegate +-(id) initWithURL:(const std::string&) url protocols:(NSArray *)protocols allowsUntrustedSSLCertificates:(BOOL)allowsUntrustedSSLCertificates ws:(cc::network::WebSocket*) ccws delegate:(const cc::network::WebSocket::Delegate&) delegate { if (self = [super init]) { _ccws = ccws; - _delegate = const_cast(&delegate); + _delegate = const_cast(&delegate); _url = url; NSURL* nsUrl = [[NSURL alloc] initWithString:[[NSString alloc] initWithUTF8String:_url.c_str()]]; _ws = [[SRWebSocket alloc] initWithURL:nsUrl protocols:protocols allowsUntrustedSSLCertificates:allowsUntrustedSSLCertificates]; @@ -97,22 +97,22 @@ static std::vector* __websocketInstances = nullptr [_ws close]; } --(cocos2d::network::WebSocket::State) getReadyState +-(cc::network::WebSocket::State) getReadyState { - cocos2d::network::WebSocket::State ret; + cc::network::WebSocket::State ret; SRReadyState state = _ws.readyState; switch (state) { case SR_OPEN: - ret = cocos2d::network::WebSocket::State::OPEN; + ret = cc::network::WebSocket::State::OPEN; break; case SR_CONNECTING: - ret = cocos2d::network::WebSocket::State::CONNECTING; + ret = cc::network::WebSocket::State::CONNECTING; break; case SR_CLOSING: - ret = cocos2d::network::WebSocket::State::CLOSING; + ret = cc::network::WebSocket::State::CLOSING; break; default: - ret = cocos2d::network::WebSocket::State::CLOSED; + ret = cc::network::WebSocket::State::CLOSED; break; } return ret; @@ -128,9 +128,9 @@ static std::vector* __websocketInstances = nullptr return _selectedProtocol; } --(cocos2d::network::WebSocket::Delegate*) getDelegate +-(cc::network::WebSocket::Delegate*) getDelegate { - return (cocos2d::network::WebSocket::Delegate*)_delegate; + return (cc::network::WebSocket::Delegate*)_delegate; } // Delegate methods @@ -155,7 +155,7 @@ static std::vector* __websocketInstances = nullptr if (!_isDestroyed) { NSLog(@":( Websocket Failed With Error %@", error); - _delegate->onError(_ccws, cocos2d::network::WebSocket::ErrorCode::UNKNOWN); + _delegate->onError(_ccws, cc::network::WebSocket::ErrorCode::UNKNOWN); [self webSocket:webSocket didCloseWithCode:0 reason:@"onerror" wasClean:YES]; } else @@ -169,7 +169,7 @@ static std::vector* __websocketInstances = nullptr if (!_isDestroyed) { std::string message = [string UTF8String]; - cocos2d::network::WebSocket::Data data; + cc::network::WebSocket::Data data; data.bytes = (char*)message.c_str(); data.len = message.length() + 1; data.isBinary = false; @@ -188,7 +188,7 @@ static std::vector* __websocketInstances = nullptr { if (!_isDestroyed) { - cocos2d::network::WebSocket::Data data; + cc::network::WebSocket::Data data; data.bytes = (char*)nsData.bytes; data.len = nsData.length; data.isBinary = true; @@ -213,7 +213,7 @@ static std::vector* __websocketInstances = nullptr @end -NS_CC_BEGIN +namespace cc { namespace network { @@ -376,4 +376,4 @@ WebSocket::Delegate* WebSocket::getDelegate() const } // namespace network { -NS_CC_END +} diff --git a/native/cocos/network/WebSocket-libwebsockets.cpp b/native/cocos/network/WebSocket-libwebsockets.cpp index 22ee0157aa..36f8152477 100644 --- a/native/cocos/network/WebSocket-libwebsockets.cpp +++ b/native/cocos/network/WebSocket-libwebsockets.cpp @@ -47,7 +47,7 @@ #include "platform/CCApplication.h" #include "platform/CCStdC.h" -#define NS_NETWORK_BEGIN namespace cocos2d { namespace network { +#define NS_NETWORK_BEGIN namespace cc { namespace network { #define NS_NETWORK_END }} #define WS_RX_BUFFER_SIZE (65536) @@ -180,10 +180,10 @@ class WebSocketImpl { public: static void closeAllConnections(); - WebSocketImpl(cocos2d::network::WebSocket* ws); + WebSocketImpl(cc::network::WebSocket* ws); ~WebSocketImpl(); - bool init(const cocos2d::network::WebSocket::Delegate& delegate, + bool init(const cc::network::WebSocket::Delegate& delegate, const std::string& url, const std::vector* protocols = nullptr, const std::string& caFilePath = ""); @@ -193,10 +193,10 @@ public: void close(); void closeAsync(); void closeAsync(int code, const std::string &reason); - cocos2d::network::WebSocket::State getReadyState() const; + cc::network::WebSocket::State getReadyState() const; const std::string& getUrl() const; const std::string& getProtocol() const; - cocos2d::network::WebSocket::Delegate* getDelegate() const; + cc::network::WebSocket::Delegate* getDelegate() const; size_t getBufferedAmount() const; std::string getExtensions() const; @@ -215,8 +215,8 @@ private: struct lws_vhost* createVhost(struct lws_protocols* protocols, int& sslConnection); private: - cocos2d::network::WebSocket* _ws; - cocos2d::network::WebSocket::State _readyState; + cc::network::WebSocket* _ws; + cc::network::WebSocket::State _readyState; std::mutex _readyStateMutex; std::string _url; std::vector _receivedData; @@ -227,7 +227,7 @@ private: std::string _selectedProtocol; std::shared_ptr> _isDestroyed; - cocos2d::network::WebSocket::Delegate* _delegate; + cc::network::WebSocket::Delegate* _delegate; std::mutex _closeMutex; std::condition_variable _closeCondition; @@ -322,7 +322,7 @@ public: WsMessage() : id(++__id), what(0), data(nullptr), user(nullptr){} unsigned int id; unsigned int what; // message type - cocos2d::network::WebSocket::Data* data; + cc::network::WebSocket::Data* data; void* user; private: @@ -509,7 +509,7 @@ void WsThreadHelper::wsThreadEntryFunc() void WsThreadHelper::sendMessageToCocosThread(const std::function& cb) { - cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread(cb); + cc::Application::getInstance()->getScheduler()->performFunctionInCocosThread(cb); } void WsThreadHelper::sendMessageToWebSocketThread(WsMessage *msg) @@ -613,9 +613,9 @@ void WebSocketImpl::closeAllConnections() } } -WebSocketImpl::WebSocketImpl(cocos2d::network::WebSocket* ws) +WebSocketImpl::WebSocketImpl(cc::network::WebSocket* ws) : _ws(ws) -, _readyState(cocos2d::network::WebSocket::State::CONNECTING) +, _readyState(cc::network::WebSocket::State::CONNECTING) , _wsInstance(nullptr) , _lwsProtocols(nullptr) , _isDestroyed(std::make_shared>(false)) @@ -637,7 +637,7 @@ WebSocketImpl::WebSocketImpl(cocos2d::network::WebSocket* ws) // since finalize callback (refer to 'WebSocket_finalize' function in jsb_websocket.cpp) will invoke 'closeAsync'. // // std::shared_ptr> isDestroyed = _isDestroyed; -// _resetDirectorListener = cocos2d::Director::getInstance()->getEventDispatcher()->addCustomEventListener(cocos2d::Director::EVENT_RESET, [this, isDestroyed](cocos2d::EventCustom*){ +// _resetDirectorListener = cc::Director::getInstance()->getEventDispatcher()->addCustomEventListener(cc::Director::EVENT_RESET, [this, isDestroyed](cc::EventCustom*){ // if (*isDestroyed) // return; // close(); @@ -674,18 +674,18 @@ WebSocketImpl::~WebSocketImpl() } // NOTE: Refer to the comment in constructor!!! -// cocos2d::Director::getInstance()->getEventDispatcher()->removeEventListener(_resetDirectorListener); +// cc::Director::getInstance()->getEventDispatcher()->removeEventListener(_resetDirectorListener); *_isDestroyed = true; } -bool WebSocketImpl::init(const cocos2d::network::WebSocket::Delegate& delegate, +bool WebSocketImpl::init(const cc::network::WebSocket::Delegate& delegate, const std::string& url, const std::vector* protocols/* = nullptr*/, const std::string& caFilePath/* = ""*/) { - _delegate = const_cast(&delegate); + _delegate = const_cast(&delegate); _url = url; _caFilePath = caFilePath; @@ -761,10 +761,10 @@ std::string WebSocketImpl::getExtensions() const void WebSocketImpl::send(const std::string& message) { - if (_readyState == cocos2d::network::WebSocket::State::OPEN) + if (_readyState == cc::network::WebSocket::State::OPEN) { // In main thread - cocos2d::network::WebSocket::Data* data = new (std::nothrow) cocos2d::network::WebSocket::Data(); + cc::network::WebSocket::Data* data = new (std::nothrow) cc::network::WebSocket::Data(); data->bytes = (char*)malloc(message.length() + 1); // Make sure the last byte is '\0' data->bytes[message.length()] = '\0'; @@ -785,10 +785,10 @@ void WebSocketImpl::send(const std::string& message) void WebSocketImpl::send(const unsigned char* binaryMsg, unsigned int len) { - if (_readyState == cocos2d::network::WebSocket::State::OPEN) + if (_readyState == cc::network::WebSocket::State::OPEN) { // In main thread - cocos2d::network::WebSocket::Data* data = new (std::nothrow) cocos2d::network::WebSocket::Data(); + cc::network::WebSocket::Data* data = new (std::nothrow) cc::network::WebSocket::Data(); if (len == 0) { // If data length is zero, allocate 1 byte for safe. @@ -826,7 +826,7 @@ void WebSocketImpl::close() LOGD("close: WebSocket (%p) is closing...\n", this); { _readyStateMutex.lock(); - if (_readyState == cocos2d::network::WebSocket::State::CLOSED) + if (_readyState == cc::network::WebSocket::State::CLOSED) { // If readState is closed, it means that onConnectionClosed was invoked in websocket thread, // but the callback of performInCocosThread has not been triggered. We need to invoke @@ -836,7 +836,7 @@ void WebSocketImpl::close() return; } - _readyState = cocos2d::network::WebSocket::State::CLOSING; + _readyState = cc::network::WebSocket::State::CLOSING; _readyStateMutex.unlock(); } @@ -869,16 +869,16 @@ void WebSocketImpl::closeAsync() LOGD("closeAsync: WebSocket (%p) is closing...\n", this); std::lock_guard lk(_readyStateMutex); - if (_readyState == cocos2d::network::WebSocket::State::CLOSED || _readyState == cocos2d::network::WebSocket::State::CLOSING) + if (_readyState == cc::network::WebSocket::State::CLOSED || _readyState == cc::network::WebSocket::State::CLOSING) { LOGD("closeAsync: WebSocket (%p) was closed, no need to close it again!\n", this); return; } - _readyState = cocos2d::network::WebSocket::State::CLOSING; + _readyState = cc::network::WebSocket::State::CLOSING; } -cocos2d::network::WebSocket::State WebSocketImpl::getReadyState() const +cc::network::WebSocket::State WebSocketImpl::getReadyState() const { std::lock_guard lk(const_cast(this)->_readyStateMutex); return _readyState; @@ -894,14 +894,14 @@ const std::string& WebSocketImpl::getProtocol() const return _selectedProtocol; } -cocos2d::network::WebSocket::Delegate* WebSocketImpl::getDelegate() const +cc::network::WebSocket::Delegate* WebSocketImpl::getDelegate() const { return _delegate; } struct lws_vhost* WebSocketImpl::createVhost(struct lws_protocols* protocols, int& sslConnection) { - auto fileUtils = cocos2d::FileUtils::getInstance(); + auto fileUtils = cc::FileUtils::getInstance(); bool isCAFileExist = fileUtils->isFileExist(_caFilePath); if (isCAFileExist) { @@ -1007,10 +1007,10 @@ void WebSocketImpl::onClientOpenConnectionRequest() }; _readyStateMutex.lock(); - _readyState = cocos2d::network::WebSocket::State::CONNECTING; + _readyState = cc::network::WebSocket::State::CONNECTING; _readyStateMutex.unlock(); - cocos2d::network::Uri uri = cocos2d::network::Uri::parse(_url); + cc::network::Uri uri = cc::network::Uri::parse(_url); LOGD("scheme: %s, host: %s, port: %d, path: %s\n", uri.getScheme().c_str(), uri.getHostName().c_str(), static_cast(uri.getPort()), uri.getPathEtc().c_str()); int sslConnection = 0; @@ -1071,7 +1071,7 @@ int WebSocketImpl::onClientWritable() // LOGD("onClientWritable ... \n"); { std::lock_guard readMutex(_readyStateMutex); - if (_readyState == cocos2d::network::WebSocket::State::CLOSING) + if (_readyState == cc::network::WebSocket::State::CLOSING) { LOGD("Closing websocket (%p) connection.\n", this); return -1; @@ -1107,7 +1107,7 @@ int WebSocketImpl::onClientWritable() { WsMessage* subThreadMsg = *iter; - cocos2d::network::WebSocket::Data* data = (cocos2d::network::WebSocket::Data*)subThreadMsg->data; + cc::network::WebSocket::Data* data = (cc::network::WebSocket::Data*)subThreadMsg->data; const ssize_t c_bufferSize = WS_RX_BUFFER_SIZE; @@ -1276,7 +1276,7 @@ int WebSocketImpl::onClientReceivedData(void* in, ssize_t len) // In UI thread LOGD("Notify data len %d to Cocos thread.\n", (int)frameSize); - cocos2d::network::WebSocket::Data data; + cc::network::WebSocket::Data data; data.isBinary = isBinary; data.bytes = (char*)frameData->data(); data.len = frameSize; @@ -1310,11 +1310,11 @@ int WebSocketImpl::onConnectionOpened() { std::lock_guard lk(_readyStateMutex); - if (_readyState == cocos2d::network::WebSocket::State::CLOSING || _readyState == cocos2d::network::WebSocket::State::CLOSED) + if (_readyState == cc::network::WebSocket::State::CLOSING || _readyState == cc::network::WebSocket::State::CLOSED) { return 0; } - _readyState = cocos2d::network::WebSocket::State::OPEN; + _readyState = cc::network::WebSocket::State::OPEN; } std::shared_ptr> isDestroyed = _isDestroyed; @@ -1336,11 +1336,11 @@ int WebSocketImpl::onConnectionError() { std::lock_guard lk(_readyStateMutex); LOGD("WebSocket (%p) onConnectionError, state: %d ...\n", this, (int)_readyState); - if (_readyState == cocos2d::network::WebSocket::State::CLOSED) + if (_readyState == cc::network::WebSocket::State::CLOSED) { return 0; } - _readyState = cocos2d::network::WebSocket::State::CLOSING; + _readyState = cc::network::WebSocket::State::CLOSING; } std::shared_ptr> isDestroyed = _isDestroyed; @@ -1351,7 +1351,7 @@ int WebSocketImpl::onConnectionError() } else { - _delegate->onError(_ws, cocos2d::network::WebSocket::ErrorCode::CONNECTION_FAILURE); + _delegate->onError(_ws, cc::network::WebSocket::ErrorCode::CONNECTION_FAILURE); } }); @@ -1365,12 +1365,12 @@ int WebSocketImpl::onConnectionClosed() { std::lock_guard lk(_readyStateMutex); LOGD("WebSocket (%p) onConnectionClosed, state: %d ...\n", this, (int)_readyState); - if (_readyState == cocos2d::network::WebSocket::State::CLOSED) + if (_readyState == cc::network::WebSocket::State::CLOSED) { return 0; } - if (_readyState == cocos2d::network::WebSocket::State::CLOSING) + if (_readyState == cc::network::WebSocket::State::CLOSING) { if (_closeState == CloseState::SYNC_CLOSING) { @@ -1402,7 +1402,7 @@ int WebSocketImpl::onConnectionClosed() LOGD("onConnectionClosed, WebSocket (%p) is closing by server.\n", this); } - _readyState = cocos2d::network::WebSocket::State::CLOSED; + _readyState = cc::network::WebSocket::State::CLOSED; } std::shared_ptr> isDestroyed = _isDestroyed; diff --git a/native/cocos/network/WebSocket.h b/native/cocos/network/WebSocket.h index 01bab8798b..029de52b5e 100644 --- a/native/cocos/network/WebSocket.h +++ b/native/cocos/network/WebSocket.h @@ -49,7 +49,7 @@ OBJC_CLASS(WebSocketImpl); * @{ */ -NS_CC_BEGIN +namespace cc { namespace network { @@ -253,7 +253,7 @@ private: } // namespace network { -NS_CC_END +} // end group /// @} diff --git a/native/cocos/platform/CCApplication.h b/native/cocos/platform/CCApplication.h index be11fed6fa..07baec5732 100644 --- a/native/cocos/platform/CCApplication.h +++ b/native/cocos/platform/CCApplication.h @@ -37,7 +37,7 @@ THE SOFTWARE. #define NANOSECONDS_PER_SECOND 1000000000 #define NANOSECONDS_60FPS 16666667L -NS_CC_BEGIN +namespace cc { /** * @addtogroup platform * @{ @@ -112,7 +112,7 @@ public: prevTime = std::chrono::steady_clock::now(); _scheduler->update(dt); - cocos2d::EventDispatcher::dispatchTickEvent(dt); + cc::EventDispatcher::dispatchTickEvent(dt); PoolManager::getInstance()->getCurrentPool()->clear(); @@ -179,17 +179,17 @@ public: std::string getSystemVersion(); // return size in logical pixel unit. - inline const cocos2d::Vec2& getViewLogicalSize() const { return _viewLogicalSize; } + inline const cc::Vec2& getViewLogicalSize() const { return _viewLogicalSize; } private: static Application* _instance; static std::shared_ptr _scheduler; int _fps = 60; long _prefererredNanosecondsPerFrame = NANOSECONDS_60FPS; - cocos2d::Vec2 _viewLogicalSize; + cc::Vec2 _viewLogicalSize; }; // end of platform group /** @} */ -NS_CC_END +} diff --git a/native/cocos/platform/CCCanvasRenderingContext2D.h b/native/cocos/platform/CCCanvasRenderingContext2D.h index 7809917efc..e97a565a10 100644 --- a/native/cocos/platform/CCCanvasRenderingContext2D.h +++ b/native/cocos/platform/CCCanvasRenderingContext2D.h @@ -40,7 +40,7 @@ OBJC_CLASS(CanvasRenderingContext2DImpl); -NS_CC_BEGIN +namespace cc { class CC_DLL CanvasGradient { @@ -76,7 +76,7 @@ public: void restore(); // callback - using CanvasBufferUpdatedCallback = std::function ; + using CanvasBufferUpdatedCallback = std::function ; void setCanvasBufferUpdatedCallback(const CanvasBufferUpdatedCallback& cb); // functions for properties @@ -136,4 +136,4 @@ private: bool _isBufferSizeDirty = true; }; -NS_CC_END +} diff --git a/native/cocos/platform/CCDevice.h b/native/cocos/platform/CCDevice.h index db894eae83..a1dfdf681c 100644 --- a/native/cocos/platform/CCDevice.h +++ b/native/cocos/platform/CCDevice.h @@ -31,7 +31,7 @@ THE SOFTWARE. #include "base/CCData.h" #include "math/Vec4.h" -NS_CC_BEGIN +namespace cc { struct FontDefinition; @@ -139,7 +139,7 @@ public: * Gets the SafeArea edge. * Vec4(x, y, z, w) means Edge(top, left, bottom, right) */ - static cocos2d::Vec4 getSafeAreaEdge(); + static Vec4 getSafeAreaEdge(); private: Device(); @@ -149,6 +149,6 @@ private: // end group /// @} -NS_CC_END +} #endif /* __CCDEVICE_H__ */ diff --git a/native/cocos/platform/CCFileUtils.cpp b/native/cocos/platform/CCFileUtils.cpp index b53fe6ee5c..f5afb92259 100644 --- a/native/cocos/platform/CCFileUtils.cpp +++ b/native/cocos/platform/CCFileUtils.cpp @@ -43,7 +43,7 @@ THE SOFTWARE. #include #include -NS_CC_BEGIN +namespace cc { // Implement DictMaker @@ -1500,4 +1500,4 @@ std::string FileUtils::normalizePath(const std::string& path) const return ret; } -NS_CC_END +} diff --git a/native/cocos/platform/CCFileUtils.h b/native/cocos/platform/CCFileUtils.h index 11b210e271..cf97a8233f 100644 --- a/native/cocos/platform/CCFileUtils.h +++ b/native/cocos/platform/CCFileUtils.h @@ -35,7 +35,7 @@ THE SOFTWARE. #include "base/CCValue.h" #include "base/CCData.h" -NS_CC_BEGIN +namespace cc { /** * @addtogroup platform @@ -185,7 +185,7 @@ public: * - read file in binary mode (does not convert CRLF to LF). * - does not truncate the string when '\0' is found (returned string of getContents may have '\0' in the middle.). * - * The template version of can accept cocos2d::Data, std::basic_string and std::vector. + * The template version of can accept cc::Data, std::basic_string and std::vector. * * @code * std::string sbuf; @@ -205,7 +205,7 @@ public: * - To write a adapter for existing class, write a specialized ResizableBufferAdapter for that class, see follow code. * * @code - * NS_CC_BEGIN // ResizableBufferAdapter needed in cocos2d namespace. + * namespace cc { // ResizableBufferAdapter needed in cocos2d namespace. * template<> * class ResizableBufferAdapter : public ResizableBuffer { * public: @@ -219,7 +219,7 @@ public: * // your code here * } * }; - * NS_CC_END + * } * @endcode * * @param[in] filename The resource file name which contains the path. @@ -778,6 +778,6 @@ protected: // end of support group /** @} */ -NS_CC_END +} #endif // __CC_FILEUTILS_H__ diff --git a/native/cocos/platform/CCImage.cpp b/native/cocos/platform/CCImage.cpp index 0bb13d6afe..d630aa0b0f 100644 --- a/native/cocos/platform/CCImage.cpp +++ b/native/cocos/platform/CCImage.cpp @@ -83,7 +83,7 @@ extern "C" #include -NS_CC_BEGIN +namespace cc { ////////////////////////////////////////////////////////////////////////// //struct and data for pvr structure @@ -1429,4 +1429,4 @@ void Image::setPVRImagesHavePremultipliedAlpha(bool haveAlphaPremultiplied) _PVRHaveAlphaPremultiplied = haveAlphaPremultiplied; } -NS_CC_END +} diff --git a/native/cocos/platform/CCImage.h b/native/cocos/platform/CCImage.h index a20b26df18..47101d493d 100644 --- a/native/cocos/platform/CCImage.h +++ b/native/cocos/platform/CCImage.h @@ -37,7 +37,7 @@ THE SOFTWARE. ((unsigned)((unsigned char)(vb) * ((unsigned char)(va) + 1) >> 8) << 16) | \ ((unsigned)(unsigned char)(va) << 24)) -NS_CC_BEGIN +namespace cc { enum class GFXFormat : unsigned int; @@ -221,6 +221,6 @@ protected: // end of platform group /// @} -NS_CC_END +} /// @endcond diff --git a/native/cocos/platform/CCSAXParser.cpp b/native/cocos/platform/CCSAXParser.cpp index b87e06e86f..91e6f797c3 100644 --- a/native/cocos/platform/CCSAXParser.cpp +++ b/native/cocos/platform/CCSAXParser.cpp @@ -32,7 +32,7 @@ #include "tinyxml2/tinyxml2.h" -NS_CC_BEGIN +namespace cc { class XmlSaxHander : public tinyxml2::XMLVisitor { @@ -145,5 +145,5 @@ void SAXParser::setDelegator(SAXDelegator* delegator) _delegator = delegator; } -NS_CC_END +} diff --git a/native/cocos/platform/CCSAXParser.h b/native/cocos/platform/CCSAXParser.h index 3e0f08bd6d..9c3b0d4d23 100644 --- a/native/cocos/platform/CCSAXParser.h +++ b/native/cocos/platform/CCSAXParser.h @@ -31,7 +31,7 @@ #include "base/ccMacros.h" #include -NS_CC_BEGIN +namespace cc { /** * @addtogroup platform @@ -116,7 +116,7 @@ public: // end of platform group /// @} -NS_CC_END +} /// @endcond #endif //__CCSAXPARSER_H__ diff --git a/native/cocos/platform/android/CCApplication-android.cpp b/native/cocos/platform/android/CCApplication-android.cpp index 9ce149a3a3..b4f26d1fc3 100644 --- a/native/cocos/platform/android/CCApplication-android.cpp +++ b/native/cocos/platform/android/CCApplication-android.cpp @@ -49,14 +49,14 @@ namespace { bool setCanvasCallback(se::Object* global) { - auto viewLogicalSize = cocos2d::Application::getInstance()->getViewLogicalSize(); + auto viewLogicalSize = cc::Application::getInstance()->getViewLogicalSize(); se::AutoHandleScope scope; se::ScriptEngine* se = se::ScriptEngine::getInstance(); char commandBuf[200] = {0}; sprintf(commandBuf, "window.innerWidth = %d; window.innerHeight = %d; window.windowHandler = 0x%" PRIxPTR ";", (int)(viewLogicalSize.x), (int)(viewLogicalSize.y), - (uintptr_t)cocos2d::JniHelper::getAndroidApp()->window); + (uintptr_t)cc::JniHelper::getAndroidApp()->window); se->evalString(commandBuf); return true; @@ -64,7 +64,7 @@ namespace } -NS_CC_BEGIN +namespace cc { Application* Application::_instance = nullptr; std::shared_ptr Application::_scheduler = nullptr; @@ -248,4 +248,4 @@ std::string Application::getSystemVersion() return getSystemVersionJNI(); } -NS_CC_END +} diff --git a/native/cocos/platform/android/CCCanvasRenderingContext2D-android.cpp b/native/cocos/platform/android/CCCanvasRenderingContext2D-android.cpp index 9015430f11..4c47ee42c2 100644 --- a/native/cocos/platform/android/CCCanvasRenderingContext2D-android.cpp +++ b/native/cocos/platform/android/CCCanvasRenderingContext2D-android.cpp @@ -11,7 +11,7 @@ #define JCLS_CANVASIMPL "org/cocos2dx/lib/CanvasRenderingContext2DImpl" #endif -using namespace cocos2d; +using namespace cc; enum class CanvasTextAlign { LEFT, @@ -276,7 +276,7 @@ namespace { } } -NS_CC_BEGIN +namespace cc { CanvasGradient::CanvasGradient() { @@ -370,10 +370,10 @@ void CanvasRenderingContext2D::strokeText(const std::string& text, float x, floa _canvasBufferUpdatedCB(_impl->getDataRef()); } -cocos2d::Size CanvasRenderingContext2D::measureText(const std::string& text) +cc::Size CanvasRenderingContext2D::measureText(const std::string& text) { // SE_LOGD("CanvasRenderingContext2D::measureText: %s\n", text.c_str()); - return cocos2d::Size(_impl->measureText(text), 0); + return cc::Size(_impl->measureText(text), 0); } CanvasGradient* CanvasRenderingContext2D::createLinearGradient(float x0, float y0, float x1, float y1) @@ -602,4 +602,4 @@ void CanvasRenderingContext2D::setTransform(float a, float b, float c, float d, // SE_LOGE("%s isn't implemented!\n", __FUNCTION__); } -NS_CC_END +} diff --git a/native/cocos/platform/android/CCDevice-android.cpp b/native/cocos/platform/android/CCDevice-android.cpp index 9c09d499b8..7c04a82e7f 100644 --- a/native/cocos/platform/android/CCDevice-android.cpp +++ b/native/cocos/platform/android/CCDevice-android.cpp @@ -53,7 +53,7 @@ namespace { const ASensor* linearAccelerometerSensor = nullptr; const ASensor* gyroscopeSensor = nullptr; ASensorEventQueue* sensorEventQueue = nullptr; - cocos2d::Device::MotionValue motionValue; + cc::Device::MotionValue motionValue; int delay = 0; // us Sensor() @@ -66,7 +66,7 @@ namespace { linearAccelerometerSensor = ASensorManager_getDefaultSensor(sensorManager, ASENSOR_TYPE_LINEAR_ACCELERATION); gyroscopeSensor = ASensorManager_getDefaultSensor(sensorManager, ASENSOR_TYPE_GYROSCOPE); - android_app* app = cocos2d::JniHelper::getAndroidApp(); + android_app* app = cc::JniHelper::getAndroidApp(); sensorEventQueue = ASensorManager_createEventQueue(sensorManager, app->looper, 3, getSensorEvents, NULL); if (!sensorEventQueue) return; @@ -143,7 +143,7 @@ namespace { } } -NS_CC_BEGIN +namespace cc { int Device::getDPI() { @@ -219,16 +219,16 @@ Device::NetworkType Device::getNetworkType() return (Device::NetworkType)JniHelper::callStaticIntMethod(JCLS_HELPER, "getNetworkType"); } -cocos2d::Vec4 Device::getSafeAreaEdge() +cc::Vec4 Device::getSafeAreaEdge() { // no SafeArea concept on android, return ZERO Vec4. - return cocos2d::Vec4(); + return cc::Vec4(); } int Device::getDevicePixelRatio() { return 1; } -NS_CC_END +} #endif // CC_PLATFORM == CC_PLATFORM_ANDROID diff --git a/native/cocos/platform/android/CCFileUtils-android.cpp b/native/cocos/platform/android/CCFileUtils-android.cpp index 9afea0239b..9a233afa63 100644 --- a/native/cocos/platform/android/CCFileUtils-android.cpp +++ b/native/cocos/platform/android/CCFileUtils-android.cpp @@ -45,7 +45,7 @@ THE SOFTWARE. #define JCLS_HELPER "org/cocos2dx/lib/Cocos2dxHelper" #endif -NS_CC_BEGIN +namespace cc { AAssetManager* FileUtilsAndroid::assetmanager = nullptr; ZipFile* FileUtilsAndroid::obbfile = nullptr; @@ -56,7 +56,7 @@ void FileUtilsAndroid::setassetmanager(AAssetManager* a) { return; } - cocos2d::FileUtilsAndroid::assetmanager = a; + cc::FileUtilsAndroid::assetmanager = a; } FileUtils* FileUtils::getInstance() @@ -328,6 +328,6 @@ std::string FileUtilsAndroid::getWritablePath() const } } -NS_CC_END +} #endif // CC_PLATFORM == CC_PLATFORM_ANDROID diff --git a/native/cocos/platform/android/CCFileUtils-android.h b/native/cocos/platform/android/CCFileUtils-android.h index 57aa30717f..9236e08e52 100644 --- a/native/cocos/platform/android/CCFileUtils-android.h +++ b/native/cocos/platform/android/CCFileUtils-android.h @@ -36,7 +36,7 @@ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. #include "jni.h" #include "android/asset_manager.h" -NS_CC_BEGIN +namespace cc { class ZipFile; @@ -82,7 +82,7 @@ private: // end of platform group /// @} -NS_CC_END +} #endif // CC_PLATFORM == CC_PLATFORM_ANDROID diff --git a/native/cocos/platform/android/CCView.cpp b/native/cocos/platform/android/CCView.cpp index f87f122974..91f4cb6a38 100644 --- a/native/cocos/platform/android/CCView.cpp +++ b/native/cocos/platform/android/CCView.cpp @@ -31,8 +31,8 @@ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. namespace { - struct cocos2d::TouchEvent touchEvent; - struct cocos2d::KeyboardEvent keyboardEvent; + struct cc::TouchEvent touchEvent; + struct cc::KeyboardEvent keyboardEvent; // key values in web, refer to http://docs.cocos.com/creator/api/en/enums/KEY.html std::unordered_map keyCodeMap = { @@ -46,18 +46,18 @@ namespace {AKEYCODE_DPAD_CENTER, 1005} }; - void dispatchTouchEvent(int index, AInputEvent* event, cocos2d::TouchEvent& touchEvent) { + void dispatchTouchEvent(int index, AInputEvent* event, cc::TouchEvent& touchEvent) { int pointerID = AMotionEvent_getPointerId(event, index); touchEvent.touches.push_back({ AMotionEvent_getX(event, index), // x AMotionEvent_getY(event, index), // y pointerID}); - cocos2d::EventDispatcher::dispatchTouchEvent(touchEvent); + cc::EventDispatcher::dispatchTouchEvent(touchEvent); touchEvent.touches.clear(); } - void dispatchTouchEvents(AInputEvent* event, cocos2d::TouchEvent& touchEvent) { + void dispatchTouchEvents(AInputEvent* event, cc::TouchEvent& touchEvent) { size_t pointerCount = AMotionEvent_getPointerCount(event); for (size_t i = 0; i < pointerCount; ++i) { touchEvent.touches.push_back({ @@ -67,12 +67,12 @@ namespace }); } - cocos2d::EventDispatcher::dispatchTouchEvent(touchEvent); + cc::EventDispatcher::dispatchTouchEvent(touchEvent); touchEvent.touches.clear(); } } -NS_CC_BEGIN +namespace cc { void View::engineHandleCmd(struct android_app* app, int32_t cmd) { @@ -84,16 +84,16 @@ void View::engineHandleCmd(struct android_app* app, int32_t cmd) isWindowInitiliased = true; return; } else { - cocos2d::CustomEvent event; + cc::CustomEvent event; event.name = EVENT_RECREATE_WINDOW; event.args->ptrVal = app->window; - cocos2d::EventDispatcher::dispatchCustomEvent(event); + cc::EventDispatcher::dispatchCustomEvent(event); } break; case APP_CMD_TERM_WINDOW: { - cocos2d::CustomEvent event; + cc::CustomEvent event; event.name = EVENT_DESTROY_WINDOW; - cocos2d::EventDispatcher::dispatchCustomEvent(event); + cc::EventDispatcher::dispatchCustomEvent(event); } break; case APP_CMD_RESUME: @@ -126,9 +126,9 @@ int32_t View::engineHandleInput(struct android_app* app, AInputEvent* event) { keyboardEvent.key = keyCode; keyboardEvent.action = action == AKEY_EVENT_ACTION_DOWN - ? cocos2d::KeyboardEvent::Action::RELEASE - : cocos2d::KeyboardEvent::Action::PRESS; - cocos2d::EventDispatcher::dispatchKeyboardEvent(keyboardEvent); + ? cc::KeyboardEvent::Action::RELEASE + : cc::KeyboardEvent::Action::PRESS; + cc::EventDispatcher::dispatchKeyboardEvent(keyboardEvent); return 1; } else if (type == AINPUT_EVENT_TYPE_MOTION){ @@ -136,31 +136,31 @@ int32_t View::engineHandleInput(struct android_app* app, AInputEvent* event) { switch (action & AMOTION_EVENT_ACTION_MASK) { case AMOTION_EVENT_ACTION_DOWN: - touchEvent.type = cocos2d::TouchEvent::Type::BEGAN; + touchEvent.type = cc::TouchEvent::Type::BEGAN; dispatchTouchEvent(0, event, touchEvent); break; case AMOTION_EVENT_ACTION_POINTER_DOWN: - touchEvent.type = cocos2d::TouchEvent::Type::BEGAN; + touchEvent.type = cc::TouchEvent::Type::BEGAN; dispatchTouchEvent((action & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT, event, touchEvent); break; case AMOTION_EVENT_ACTION_UP: - touchEvent.type = cocos2d::TouchEvent::Type::ENDED; + touchEvent.type = cc::TouchEvent::Type::ENDED; dispatchTouchEvent(0, event, touchEvent); break; case AMOTION_EVENT_ACTION_POINTER_UP: - touchEvent.type = cocos2d::TouchEvent::Type::ENDED; + touchEvent.type = cc::TouchEvent::Type::ENDED; dispatchTouchEvent((action & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT, event, touchEvent); break; case AMOTION_EVENT_ACTION_MOVE: - touchEvent.type = cocos2d::TouchEvent::Type::MOVED; + touchEvent.type = cc::TouchEvent::Type::MOVED; dispatchTouchEvents(event, touchEvent); break; case AMOTION_EVENT_ACTION_CANCEL: - touchEvent.type = cocos2d::TouchEvent::Type::CANCELLED; + touchEvent.type = cc::TouchEvent::Type::CANCELLED; dispatchTouchEvents(event, touchEvent); break; default: @@ -173,4 +173,4 @@ int32_t View::engineHandleInput(struct android_app* app, AInputEvent* event) { return 0; } -NS_CC_END +} diff --git a/native/cocos/platform/android/CCView.h b/native/cocos/platform/android/CCView.h index 55802fcbd8..0f19609a1f 100644 --- a/native/cocos/platform/android/CCView.h +++ b/native/cocos/platform/android/CCView.h @@ -29,7 +29,7 @@ struct android_app; struct AInputEvent; -NS_CC_BEGIN +namespace cc { class TouchEvent; @@ -40,4 +40,4 @@ public: static int32_t engineHandleInput(struct android_app* app, AInputEvent* event); }; -NS_CC_END +} diff --git a/native/cocos/platform/android/jni/JniHelper.cpp b/native/cocos/platform/android/jni/JniHelper.cpp index 731c055aca..b4b055eb06 100644 --- a/native/cocos/platform/android/jni/JniHelper.cpp +++ b/native/cocos/platform/android/jni/JniHelper.cpp @@ -43,12 +43,12 @@ jclass _getClassID(const char *className) { return nullptr; } - JNIEnv* env = cocos2d::JniHelper::getEnv(); + JNIEnv* env = cc::JniHelper::getEnv(); jstring _jstrClassName = env->NewStringUTF(className); - jclass _clazz = (jclass) env->CallObjectMethod(cocos2d::JniHelper::classloader, - cocos2d::JniHelper::loadclassMethod_methodID, + jclass _clazz = (jclass) env->CallObjectMethod(cc::JniHelper::classloader, + cc::JniHelper::loadclassMethod_methodID, _jstrClassName); if (nullptr == _clazz) { @@ -62,10 +62,10 @@ jclass _getClassID(const char *className) { } void _detachCurrentThread(void* a) { - cocos2d::JniHelper::getJavaVM()->DetachCurrentThread(); + cc::JniHelper::getJavaVM()->DetachCurrentThread(); } -namespace cocos2d { +namespace cc { android_app* JniHelper::_app = nullptr; jmethodID JniHelper::loadclassMethod_methodID = nullptr; @@ -146,7 +146,7 @@ namespace cocos2d { return false; } - jobject _c = cocos2d::JniHelper::getEnv()->CallObjectMethod(activityinstance, + jobject _c = cc::JniHelper::getEnv()->CallObjectMethod(activityinstance, _getclassloaderMethod.methodID); if (nullptr == _c) { @@ -161,9 +161,9 @@ namespace cocos2d { return false; } - JniHelper::classloader = cocos2d::JniHelper::getEnv()->NewGlobalRef(_c); + JniHelper::classloader = cc::JniHelper::getEnv()->NewGlobalRef(_c); JniHelper::loadclassMethod_methodID = _m.methodID; - JniHelper::_activity = cocos2d::JniHelper::getEnv()->NewGlobalRef(activityinstance); + JniHelper::_activity = cc::JniHelper::getEnv()->NewGlobalRef(activityinstance); if (JniHelper::classloaderCallback != nullptr){ JniHelper::classloaderCallback(); } @@ -289,21 +289,21 @@ namespace cocos2d { return ""; } - std::string strValue = cocos2d::StringUtils::getStringUTFCharsJNI(env, jstr); + std::string strValue = cc::StringUtils::getStringUTFCharsJNI(env, jstr); return strValue; } - jstring JniHelper::convert(JniHelper::LocalRefMapType& localRefs, cocos2d::JniMethodInfo& t, const char* x) { + jstring JniHelper::convert(JniHelper::LocalRefMapType& localRefs, cc::JniMethodInfo& t, const char* x) { jstring ret = nullptr; if (x) - ret = cocos2d::StringUtils::newStringUTFJNI(t.env, x); + ret = cc::StringUtils::newStringUTFJNI(t.env, x); localRefs[t.env].push_back(ret); return ret; } - jstring JniHelper::convert(JniHelper::LocalRefMapType& localRefs, cocos2d::JniMethodInfo& t, const std::string& x) { + jstring JniHelper::convert(JniHelper::LocalRefMapType& localRefs, cc::JniMethodInfo& t, const std::string& x) { return convert(localRefs, t, x.c_str()); } @@ -322,4 +322,4 @@ namespace cocos2d { LOGE("Failed to find static java method. Class name: %s, method name: %s, signature: %s ", className.c_str(), methodName.c_str(), signature.c_str()); } -} //namespace cocos2d +} //namespace cc diff --git a/native/cocos/platform/android/jni/JniHelper.h b/native/cocos/platform/android/jni/JniHelper.h index d6dce5eed4..4dc8262d44 100644 --- a/native/cocos/platform/android/jni/JniHelper.h +++ b/native/cocos/platform/android/jni/JniHelper.h @@ -1,5 +1,5 @@ /**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2010-2012 cc-x.org Copyright (c) 2013-2016 Chukong Technologies Inc. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. @@ -40,7 +40,7 @@ THE SOFTWARE. struct android_app; -NS_CC_BEGIN +namespace cc { typedef struct JniMethodInfo_ { @@ -80,9 +80,9 @@ public: { jobject ret = nullptr; static const char* methodName = ""; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")V"; - if (cocos2d::JniHelper::getMethodInfo(t, className.c_str(), methodName, signature.c_str())) { + if (cc::JniHelper::getMethodInfo(t, className.c_str(), methodName, signature.c_str())) { LocalRefMapType localRefs; ret = t.env->NewObject(t.classID, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -98,9 +98,9 @@ public: const std::string& className, const std::string& methodName, Ts... xs) { - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")V"; - if (cocos2d::JniHelper::getMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; t.env->CallVoidMethod(object, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -116,9 +116,9 @@ public: const std::string& methodName, Ts... xs) { float ret = 0.0f; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")F"; - if (cocos2d::JniHelper::getMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; ret = t.env->CallFloatMethod(object, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -135,9 +135,9 @@ public: const std::string& methodName, Ts... xs) { jbyteArray ret = nullptr; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")[B"; - if (cocos2d::JniHelper::getMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; ret = (jbyteArray)t.env->CallObjectMethod(object, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -152,9 +152,9 @@ public: static void callStaticVoidMethod(const std::string& className, const std::string& methodName, Ts... xs) { - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")V"; - if (cocos2d::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; t.env->CallStaticVoidMethod(t.classID, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -169,9 +169,9 @@ public: const std::string& methodName, Ts... xs) { jboolean jret = JNI_FALSE; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")Z"; - if (cocos2d::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; jret = t.env->CallStaticBooleanMethod(t.classID, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -187,9 +187,9 @@ public: const std::string& methodName, Ts... xs) { jint ret = 0; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")I"; - if (cocos2d::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; ret = t.env->CallStaticIntMethod(t.classID, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -205,9 +205,9 @@ public: const std::string& methodName, Ts... xs) { jfloat ret = 0.0; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")F"; - if (cocos2d::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; ret = t.env->CallStaticFloatMethod(t.classID, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -223,9 +223,9 @@ public: const std::string& methodName, Ts... xs) { static float ret[32]; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")[F"; - if (cocos2d::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; jfloatArray array = (jfloatArray) t.env->CallStaticObjectMethod(t.classID, t.methodID, convert(localRefs, t, xs)...); jsize len = t.env->GetArrayLength(array); @@ -250,9 +250,9 @@ public: const std::string& methodName, Ts... xs) { Vec3 ret; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")[F"; - if (cocos2d::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; jfloatArray array = (jfloatArray) t.env->CallStaticObjectMethod(t.classID, t.methodID, convert(localRefs, t, xs)...); jsize len = t.env->GetArrayLength(array); @@ -276,9 +276,9 @@ public: const std::string& methodName, Ts... xs) { jdouble ret = 0.0; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")D"; - if (cocos2d::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; ret = t.env->CallStaticDoubleMethod(t.classID, t.methodID, convert(localRefs, t, xs)...); t.env->DeleteLocalRef(t.classID); @@ -295,12 +295,12 @@ public: Ts... xs) { std::string ret; - cocos2d::JniMethodInfo t; + cc::JniMethodInfo t; std::string signature = "(" + std::string(getJNISignature(xs...)) + ")Ljava/lang/String;"; - if (cocos2d::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { + if (cc::JniHelper::getStaticMethodInfo(t, className.c_str(), methodName.c_str(), signature.c_str())) { LocalRefMapType localRefs; jstring jret = (jstring)t.env->CallStaticObjectMethod(t.classID, t.methodID, convert(localRefs, t, xs)...); - ret = cocos2d::JniHelper::jstring2string(jret); + ret = cc::JniHelper::jstring2string(jret); t.env->DeleteLocalRef(t.classID); t.env->DeleteLocalRef(jret); deleteLocalRefs(t.env, localRefs); @@ -320,12 +320,12 @@ private: const char *methodName, const char *paramCode); - static jstring convert(LocalRefMapType &localRefs, cocos2d::JniMethodInfo& t, const char* x); + static jstring convert(LocalRefMapType &localRefs, cc::JniMethodInfo& t, const char* x); - static jstring convert(LocalRefMapType &localRefs, cocos2d::JniMethodInfo& t, const std::string& x); + static jstring convert(LocalRefMapType &localRefs, cc::JniMethodInfo& t, const std::string& x); template - static T convert(LocalRefMapType &localRefs, cocos2d::JniMethodInfo&, T x) { + static T convert(LocalRefMapType &localRefs, cc::JniMethodInfo&, T x) { return x; } @@ -390,6 +390,6 @@ private: static void reportError(const std::string& className, const std::string& methodName, const std::string& signature); }; -NS_CC_END +} #endif // __ANDROID_JNI_HELPER_H__ diff --git a/native/cocos/platform/android/jni/JniImp.cpp b/native/cocos/platform/android/jni/JniImp.cpp index 5cc301b065..eaa3f1b7d4 100644 --- a/native/cocos/platform/android/jni/JniImp.cpp +++ b/native/cocos/platform/android/jni/JniImp.cpp @@ -34,7 +34,7 @@ #define JCLS_HELPER "org/cocos2dx/lib/Cocos2dxHelper" #endif -using namespace cocos2d; +using namespace cc; /*********************************************************** * Functions invoke from cpp to Java. diff --git a/native/cocos/platform/apple/CCCanvasRenderingContext2D-apple.mm b/native/cocos/platform/apple/CCCanvasRenderingContext2D-apple.mm index b06c9b1c9a..6c4aeab45b 100644 --- a/native/cocos/platform/apple/CCCanvasRenderingContext2D-apple.mm +++ b/native/cocos/platform/apple/CCCanvasRenderingContext2D-apple.mm @@ -53,7 +53,7 @@ enum class CanvasTextBaseline { #endif CGColorSpaceRef _colorSpace; - cocos2d::Data _imageData; + cc::Data _imageData; NSBezierPath* _path; CanvasTextAlign _textAlign; @@ -412,7 +412,7 @@ enum class CanvasTextBaseline { _strokeStyle[3] = a; } --(const cocos2d::Data&) getDataRef { +-(const cc::Data&) getDataRef { return _imageData; } @@ -513,7 +513,7 @@ enum class CanvasTextBaseline { @end -NS_CC_BEGIN +namespace cc { CanvasGradient::CanvasGradient() { @@ -622,11 +622,11 @@ void CanvasRenderingContext2D::strokeText(const std::string& text, float x, floa SEND_DATA_TO_JS(_canvasBufferUpdatedCB, _impl); } -cocos2d::Size CanvasRenderingContext2D::measureText(const std::string& text) +cc::Size CanvasRenderingContext2D::measureText(const std::string& text) { // SE_LOGD("CanvasRenderingContext2D::measureText: %s\n", text.c_str()); CGSize size = [_impl measureText: [NSString stringWithUTF8String:text.c_str()]]; - return cocos2d::Size(size.width, size.height); + return cc::Size(size.width, size.height); } CanvasGradient* CanvasRenderingContext2D::createLinearGradient(float x0, float y0, float x1, float y1) @@ -834,4 +834,4 @@ void CanvasRenderingContext2D::setTransform(float a, float b, float c, float d, //SE_LOGE("%s isn't implemented!\n", __FUNCTION__); } -NS_CC_END +} diff --git a/native/cocos/platform/apple/CCDevice-apple.mm b/native/cocos/platform/apple/CCDevice-apple.mm index 17a16c3632..a6092943c9 100644 --- a/native/cocos/platform/apple/CCDevice-apple.mm +++ b/native/cocos/platform/apple/CCDevice-apple.mm @@ -35,7 +35,7 @@ #endif -NS_CC_BEGIN +namespace cc { int Device::getDevicePixelRatio() { @@ -51,4 +51,4 @@ int Device::getDevicePixelRatio() } -NS_CC_END +} diff --git a/native/cocos/platform/apple/CCFileUtils-apple.h b/native/cocos/platform/apple/CCFileUtils-apple.h index b6b50b2ce4..e74a5448e5 100644 --- a/native/cocos/platform/apple/CCFileUtils-apple.h +++ b/native/cocos/platform/apple/CCFileUtils-apple.h @@ -34,7 +34,7 @@ #include "platform/CCFileUtils.h" #include "base/ccMacros.h" -NS_CC_BEGIN +namespace cc { /** * @addtogroup platform @@ -74,6 +74,6 @@ private: // end of platform group /// @} -NS_CC_END +} #endif // __CC_FILEUTILS_APPLE_H__ diff --git a/native/cocos/platform/apple/CCFileUtils-apple.mm b/native/cocos/platform/apple/CCFileUtils-apple.mm index e71e029372..5d1bca3169 100644 --- a/native/cocos/platform/apple/CCFileUtils-apple.mm +++ b/native/cocos/platform/apple/CCFileUtils-apple.mm @@ -1,5 +1,5 @@ /**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2010-2012 cc-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2016 Chukong Technologies Inc. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. @@ -36,7 +36,7 @@ THE SOFTWARE. #include "platform/CCFileUtils.h" #include "platform/CCSAXParser.h" -NS_CC_BEGIN +namespace cc { struct FileUtilsApple::IMPL { IMPL(NSBundle* bundle):bundle_([NSBundle mainBundle]) {} @@ -50,15 +50,15 @@ private: NSBundle* bundle_; }; -static id convertCCValueToNSObject(const cocos2d::Value &value); -static cocos2d::Value convertNSObjectToCCValue(id object); +static id convertCCValueToNSObject(const cc::Value &value); +static cc::Value convertNSObjectToCCValue(id object); static void addNSObjectToCCMap(id nsKey, id nsValue, ValueMap& dict); static void addCCValueToNSDictionary(const std::string& key, const Value& value, NSMutableDictionary *dict); static void addNSObjectToCCVector(id item, ValueVector& array); static void addCCValueToNSArray(const Value& value, NSMutableArray *array); -static id convertCCValueToNSObject(const cocos2d::Value &value) +static id convertCCValueToNSObject(const cc::Value &value) { switch (value.getType()) { @@ -111,7 +111,7 @@ static id convertCCValueToNSObject(const cocos2d::Value &value) return [NSNull null]; } -static cocos2d::Value convertNSObjectToCCValue(id item) +static cc::Value convertNSObjectToCCValue(id item) { // add string value into array if ([item isKindOfClass:[NSString class]]) @@ -500,4 +500,4 @@ bool FileUtilsApple::createDirectory(const std::string& path) return result; } -NS_CC_END +} diff --git a/native/cocos/platform/ios/CCApplication-ios.mm b/native/cocos/platform/ios/CCApplication-ios.mm index 85c83ddcda..c849b2231c 100644 --- a/native/cocos/platform/ios/CCApplication-ios.mm +++ b/native/cocos/platform/ios/CCApplication-ios.mm @@ -32,11 +32,11 @@ @interface MyTimer : NSObject { - cocos2d::Application* _app; + cc::Application* _app; CADisplayLink* _displayLink; int _fps; } -- (instancetype)initWithApp:(cocos2d::Application*)app fps:(int)fps; +- (instancetype)initWithApp:(cc::Application*)app fps:(int)fps; - (void)start; - (void)changeFPS:(int)fps; - (void)pause; @@ -45,7 +45,7 @@ @implementation MyTimer -- (instancetype)initWithApp:(cocos2d::Application*)app fps:(int)fps +- (instancetype)initWithApp:(cc::Application*)app fps:(int)fps { if (self = [super init]) { @@ -84,13 +84,13 @@ @end -NS_CC_BEGIN +namespace cc { namespace { bool setCanvasCallback(se::Object* global) { - auto viewLogicalSize = cocos2d::Application::getInstance()->getViewLogicalSize(); + auto viewLogicalSize = cc::Application::getInstance()->getViewLogicalSize(); se::ScriptEngine* se = se::ScriptEngine::getInstance(); char commandBuf[200] = {0}; // https://stackoverflow.com/questions/5795978/string-format-for-intptr-t-and-uintptr-t/41897226#41897226 @@ -250,4 +250,4 @@ void Application::setPreferredFramesPerSecond(int fps) [_timer changeFPS:_fps]; } -NS_CC_END +} diff --git a/native/cocos/platform/ios/CCDevice-ios.mm b/native/cocos/platform/ios/CCDevice-ios.mm index 2d17d8aecc..3ae257e3a8 100644 --- a/native/cocos/platform/ios/CCDevice-ios.mm +++ b/native/cocos/platform/ios/CCDevice-ios.mm @@ -44,7 +44,7 @@ static const float radToDeg = (180/M_PI); @interface CCMotionDispatcher : NSObject { CMMotionManager* _motionManager; - cocos2d::Device::MotionValue _motionValue; + cc::Device::MotionValue _motionValue; float _interval; // unit: seconds bool _enabled; } @@ -133,7 +133,7 @@ static CCMotionDispatcher* __motionDispatcher = nullptr; } } --(const cocos2d::Device::MotionValue&) getMotionValue { +-(const cc::Device::MotionValue&) getMotionValue { if (_motionManager.isDeviceMotionAvailable) { CMDeviceMotion* motion = _motionManager.deviceMotion; @@ -163,7 +163,7 @@ static CCMotionDispatcher* __motionDispatcher = nullptr; // -NS_CC_BEGIN +namespace cc { int Device::getDPI() { @@ -297,7 +297,7 @@ Device::NetworkType Device::getNetworkType() return ret; } -cocos2d::Vec4 Device::getSafeAreaEdge() +cc::Vec4 Device::getSafeAreaEdge() { //TODO:minggo // UIView* screenView = (UIView*)Application::getInstance()->getView(); @@ -318,12 +318,12 @@ cocos2d::Vec4 Device::getSafeAreaEdge() // safeAreaEdge.top *= scale; // safeAreaEdge.bottom *= scale; // -// return cocos2d::Vec4(safeAreaEdge.top, safeAreaEdge.left, safeAreaEdge.bottom, safeAreaEdge.right); +// return cc::Vec4(safeAreaEdge.top, safeAreaEdge.left, safeAreaEdge.bottom, safeAreaEdge.right); // } //#endif // // // If running on iOS devices lower than 11.0, return ZERO Vec4. -// return cocos2d::Vec4(); - return cocos2d::Vec4(); +// return cc::Vec4(); + return cc::Vec4(); +} } -NS_CC_END diff --git a/native/cocos/platform/ios/CCImage-ios.mm b/native/cocos/platform/ios/CCImage-ios.mm index 82363df427..e565842e15 100644 --- a/native/cocos/platform/ios/CCImage-ios.mm +++ b/native/cocos/platform/ios/CCImage-ios.mm @@ -35,9 +35,9 @@ THE SOFTWARE. #include -NS_CC_BEGIN +namespace cc { -bool cocos2d::Image::saveToFile(const std::string& filename, bool isToRGB) +bool cc::Image::saveToFile(const std::string& filename, bool isToRGB) { bool saveToPNG = false; bool needToCopyPixels = false; @@ -121,7 +121,7 @@ bool cocos2d::Image::saveToFile(const std::string& filename, bool isToRGB) return true; } -NS_CC_END +} #endif // CC_PLATFORM_MAC_IOS diff --git a/native/cocos/platform/ios/CCReachability.cpp b/native/cocos/platform/ios/CCReachability.cpp index 2c6bba0dcd..3c5af99156 100644 --- a/native/cocos/platform/ios/CCReachability.cpp +++ b/native/cocos/platform/ios/CCReachability.cpp @@ -60,23 +60,23 @@ namespace { #endif } - cocos2d::Reachability::NetworkStatus getNetworkStatusForFlags(SCNetworkReachabilityFlags flags) + cc::Reachability::NetworkStatus getNetworkStatusForFlags(SCNetworkReachabilityFlags flags) { PrintReachabilityFlags(flags, "networkStatusForFlags"); if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) { // The target host is not reachable. - return cocos2d::Reachability::NetworkStatus::NOT_REACHABLE; + return cc::Reachability::NetworkStatus::NOT_REACHABLE; } - cocos2d::Reachability::NetworkStatus returnValue = cocos2d::Reachability::NetworkStatus::NOT_REACHABLE; + cc::Reachability::NetworkStatus returnValue = cc::Reachability::NetworkStatus::NOT_REACHABLE; if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) { /* If the target host is reachable and no connection is required then we'll assume (for now) that you're on Wi-Fi... */ - returnValue = cocos2d::Reachability::NetworkStatus::REACHABLE_VIA_WIFI; + returnValue = cc::Reachability::NetworkStatus::REACHABLE_VIA_WIFI; } if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || @@ -91,7 +91,7 @@ namespace { /* ... and no [user] intervention is needed... */ - returnValue = cocos2d::Reachability::NetworkStatus::REACHABLE_VIA_WIFI; + returnValue = cc::Reachability::NetworkStatus::REACHABLE_VIA_WIFI; } } @@ -101,7 +101,7 @@ namespace { /* ... but WWAN connections are OK if the calling application is using the CFNetwork APIs. */ - returnValue = cocos2d::Reachability::NetworkStatus::REACHABLE_VIA_WWAN; + returnValue = cc::Reachability::NetworkStatus::REACHABLE_VIA_WWAN; } #endif @@ -109,7 +109,7 @@ namespace { } } -NS_CC_BEGIN +namespace cc { Reachability* Reachability::createWithHostName(const std::string& hostName) { @@ -181,7 +181,7 @@ void Reachability::onReachabilityCallback(SCNetworkReachabilityRef target, SCNet { CCASSERT(info != nullptr, "info was nullptr in onReachabilityCallback"); - cocos2d::Reachability* thiz = reinterpret_cast(info); + cc::Reachability* thiz = reinterpret_cast(info); if (thiz->_callback != nullptr) { NetworkStatus status = getNetworkStatusForFlags(flags); @@ -243,4 +243,4 @@ Reachability::NetworkStatus Reachability::getCurrentReachabilityStatus() const return returnValue; } -NS_CC_END +} diff --git a/native/cocos/platform/ios/CCReachability.h b/native/cocos/platform/ios/CCReachability.h index 9826784298..60ece3d58d 100644 --- a/native/cocos/platform/ios/CCReachability.h +++ b/native/cocos/platform/ios/CCReachability.h @@ -31,7 +31,7 @@ struct sockaddr; -NS_CC_BEGIN +namespace cc { class Reachability final : public Ref { @@ -85,5 +85,5 @@ private: SCNetworkReachabilityRef _reachabilityRef; }; -NS_CC_END +} diff --git a/native/cocos/platform/ios/CCView.mm b/native/cocos/platform/ios/CCView.mm index 1390fa9778..a7e68c0206 100644 --- a/native/cocos/platform/ios/CCView.mm +++ b/native/cocos/platform/ios/CCView.mm @@ -26,7 +26,7 @@ namespace { - void dispatchEvents(cocos2d::TouchEvent& touchEvent, NSSet* touches) + void dispatchEvents(cc::TouchEvent& touchEvent, NSSet* touches) { for (UITouch* touch in touches) { touchEvent.touches.push_back({ @@ -35,14 +35,14 @@ namespace static_cast((intptr_t)touch) }); } - cocos2d::EventDispatcher::dispatchTouchEvent(touchEvent); + cc::EventDispatcher::dispatchTouchEvent(touchEvent); touchEvent.touches.clear(); } } @implementation View { - cocos2d::TouchEvent _touchEvent; + cc::TouchEvent _touchEvent; } @synthesize preventTouch; @@ -62,7 +62,7 @@ namespace if (self.preventTouch) return; - _touchEvent.type = cocos2d::TouchEvent::Type::BEGAN; + _touchEvent.type = cc::TouchEvent::Type::BEGAN; dispatchEvents(_touchEvent, touches); } @@ -71,7 +71,7 @@ namespace if (self.preventTouch) return; - _touchEvent.type = cocos2d::TouchEvent::Type::MOVED; + _touchEvent.type = cc::TouchEvent::Type::MOVED; dispatchEvents(_touchEvent, touches); } @@ -79,7 +79,7 @@ namespace if (self.preventTouch) return; - _touchEvent.type = cocos2d::TouchEvent::Type::ENDED; + _touchEvent.type = cc::TouchEvent::Type::ENDED; dispatchEvents(_touchEvent, touches); } @@ -87,7 +87,7 @@ namespace if (self.preventTouch) return; - _touchEvent.type = cocos2d::TouchEvent::Type::CANCELLED; + _touchEvent.type = cc::TouchEvent::Type::CANCELLED; dispatchEvents(_touchEvent, touches); } diff --git a/native/cocos/platform/mac/CCApplication-mac.mm b/native/cocos/platform/mac/CCApplication-mac.mm index 11aa0c2db9..51abbc4e20 100644 --- a/native/cocos/platform/mac/CCApplication-mac.mm +++ b/native/cocos/platform/mac/CCApplication-mac.mm @@ -34,11 +34,11 @@ THE SOFTWARE. @interface MyTimer : NSObject { - cocos2d::Application* _app; + cc::Application* _app; NSTimer* _timer; int _fps; } -- (instancetype)initWithApp:(cocos2d::Application*)app fps:(int)fps; +- (instancetype)initWithApp:(cc::Application*)app fps:(int)fps; - (void)start; - (void)changeFPS:(int)fps; - (void)pause; @@ -47,7 +47,7 @@ THE SOFTWARE. @implementation MyTimer -- (instancetype)initWithApp:(cocos2d::Application*)app fps:(int)fps +- (instancetype)initWithApp:(cc::Application*)app fps:(int)fps { if (self = [super init]) { @@ -92,7 +92,7 @@ THE SOFTWARE. @end -NS_CC_BEGIN +namespace cc { namespace { @@ -279,4 +279,4 @@ std::string Application::getSystemVersion() return version; } -NS_CC_END +} diff --git a/native/cocos/platform/mac/CCDevice-mac.mm b/native/cocos/platform/mac/CCDevice-mac.mm index 1491997ad4..8d96215789 100644 --- a/native/cocos/platform/mac/CCDevice-mac.mm +++ b/native/cocos/platform/mac/CCDevice-mac.mm @@ -36,7 +36,7 @@ THE SOFTWARE. #include #include -NS_CC_BEGIN +namespace cc { int Device::getDPI() { @@ -116,12 +116,12 @@ Device::NetworkType Device::getNetworkType() return ret; } -cocos2d::Vec4 Device::getSafeAreaEdge() +Vec4 Device::getSafeAreaEdge() { // no SafeArea concept on mac, return ZERO Vec4. - return cocos2d::Vec4(); + return Vec4(); } -NS_CC_END +} #endif // CC_PLATFORM == CC_PLATFORM_MAC_OSX diff --git a/native/cocos/platform/mac/CCView.mm b/native/cocos/platform/mac/CCView.mm index e772c6fe12..9605b3dfa3 100644 --- a/native/cocos/platform/mac/CCView.mm +++ b/native/cocos/platform/mac/CCView.mm @@ -29,8 +29,8 @@ #include "platform/CCApplication.h" @implementation View { - cocos2d::MouseEvent _mouseEvent; - cocos2d::KeyboardEvent _keyboardEvent; + cc::MouseEvent _mouseEvent; + cc::KeyboardEvent _keyboardEvent; #ifdef USE_METAL dispatch_semaphore_t _frameBoundarySemaphore; #endif @@ -52,7 +52,7 @@ #ifdef USE_METAL - (void)drawInMTKView:(MTKView *)view { - cocos2d::Application::getInstance()->tick(); + cc::Application::getInstance()->tick(); [self.currentDrawable present]; } @@ -62,17 +62,17 @@ - (void)keyDown:(NSEvent *)event { _keyboardEvent.key = translateKeycode(event.keyCode); - _keyboardEvent.action = [event isARepeat] ? cocos2d::KeyboardEvent::Action::REPEAT - : cocos2d::KeyboardEvent::Action::PRESS; + _keyboardEvent.action = [event isARepeat] ? cc::KeyboardEvent::Action::REPEAT + : cc::KeyboardEvent::Action::PRESS; [self setModifierFlags:event]; - cocos2d::EventDispatcher::dispatchKeyboardEvent(_keyboardEvent); + cc::EventDispatcher::dispatchKeyboardEvent(_keyboardEvent); } - (void)keyUp:(NSEvent *)event { _keyboardEvent.key = translateKeycode(event.keyCode); - _keyboardEvent.action = cocos2d::KeyboardEvent::Action::RELEASE; + _keyboardEvent.action = cc::KeyboardEvent::Action::RELEASE; [self setModifierFlags:event]; - cocos2d::EventDispatcher::dispatchKeyboardEvent(_keyboardEvent); + cc::EventDispatcher::dispatchKeyboardEvent(_keyboardEvent); } - (void)setModifierFlags:(NSEvent*)event { @@ -100,13 +100,13 @@ - (void)mouseDown:(NSEvent *)event { [self sendMouseEvent:0 - type:cocos2d::MouseEvent::Type::DOWN + type:cc::MouseEvent::Type::DOWN event:event]; } - (void)mouseUp:(NSEvent *)event { [self sendMouseEvent:0 - type:cocos2d::MouseEvent::Type::UP + type:cc::MouseEvent::Type::UP event:event]; } @@ -116,19 +116,19 @@ - (void)mouseMoved:(NSEvent *)event { [self sendMouseEvent:0 - type:cocos2d::MouseEvent::Type::MOVE + type:cc::MouseEvent::Type::MOVE event:event]; } - (void)otherMouseDown:(NSEvent *)event { [self sendMouseEvent:[self translateButtonNumber:event.buttonNumber] - type:cocos2d::MouseEvent::Type::DOWN + type:cc::MouseEvent::Type::DOWN event:event]; } - (void)otherMouseUp:(NSEvent *)event { [self sendMouseEvent:[self translateButtonNumber:event.buttonNumber] - type:cocos2d::MouseEvent::Type::UP + type:cc::MouseEvent::Type::UP event:event]; } @@ -151,23 +151,23 @@ } if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0) { - _mouseEvent.type = cocos2d::MouseEvent::Type::WHEEL; + _mouseEvent.type = cc::MouseEvent::Type::WHEEL; _mouseEvent.button = 0; _mouseEvent.x = deltaX; _mouseEvent.y = deltaY; - cocos2d::EventDispatcher::dispatchMouseEvent(_mouseEvent); + cc::EventDispatcher::dispatchMouseEvent(_mouseEvent); } } - (void)rightMouseDown:(NSEvent *)event { [self sendMouseEvent:2 - type:cocos2d::MouseEvent::Type::DOWN + type:cc::MouseEvent::Type::DOWN event:event]; } - (void)rightMouseUp:(NSEvent *)event { [self sendMouseEvent:2 - type:cocos2d::MouseEvent::Type::UP + type:cc::MouseEvent::Type::UP event:event]; } @@ -175,7 +175,7 @@ return YES; } -- (void)sendMouseEvent:(int)button type:(cocos2d::MouseEvent::Type)type event:(NSEvent*)event { +- (void)sendMouseEvent:(int)button type:(cc::MouseEvent::Type)type event:(NSEvent*)event { const NSRect contentRect = [self frame]; const NSPoint pos = [event locationInWindow]; @@ -183,7 +183,7 @@ _mouseEvent.button = button; _mouseEvent.x = pos.x; _mouseEvent.y = contentRect.size.height - pos.y; - cocos2d::EventDispatcher::dispatchMouseEvent(_mouseEvent); + cc::EventDispatcher::dispatchMouseEvent(_mouseEvent); } @end diff --git a/native/cocos/platform/win32/CCApplication-win32.cpp b/native/cocos/platform/win32/CCApplication-win32.cpp index 8ea9ca28d3..0e7c820a7f 100644 --- a/native/cocos/platform/win32/CCApplication-win32.cpp +++ b/native/cocos/platform/win32/CCApplication-win32.cpp @@ -39,9 +39,9 @@ THE SOFTWARE. #include "base/CCAutoreleasePool.h" #include "audio/include/AudioEngine.h" -extern std::shared_ptr cc_get_application_view(); +extern std::shared_ptr cc_get_application_view(); -NS_CC_BEGIN +namespace cc { Application* Application::_instance = nullptr; std::shared_ptr Application::_scheduler = nullptr; @@ -235,4 +235,4 @@ std::string Application::getSystemVersion() snprintf(buff, sizeof(buff), "Windows version %d.%d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber); return buff; } -NS_CC_END +} diff --git a/native/cocos/platform/win32/CCCanvasRenderingContext2D-win32.cpp b/native/cocos/platform/win32/CCCanvasRenderingContext2D-win32.cpp index 2993a194e7..9d202290ec 100644 --- a/native/cocos/platform/win32/CCCanvasRenderingContext2D-win32.cpp +++ b/native/cocos/platform/win32/CCCanvasRenderingContext2D-win32.cpp @@ -312,7 +312,7 @@ public: _lineWidth = lineWidth; } - const cocos2d::Data& getDataRef() const + const cc::Data& getDataRef() const { return _imageData; } @@ -321,7 +321,7 @@ public: HBITMAP _bmp; private: - cocos2d::Data _imageData; + cc::Data _imageData; HFONT _font; HWND _wnd; HPEN _hpen; @@ -555,7 +555,7 @@ private: } }; -NS_CC_BEGIN +namespace cc { CanvasGradient::CanvasGradient() { @@ -642,11 +642,11 @@ void CanvasRenderingContext2D::strokeText(const std::string& text, float x, floa _canvasBufferUpdatedCB(_impl->getDataRef()); } -cocos2d::Size CanvasRenderingContext2D::measureText(const std::string& text) +cc::Size CanvasRenderingContext2D::measureText(const std::string& text) { //SE_LOGD("CanvasRenderingContext2D::measureText: %s\n", text.c_str()); auto s =_impl->measureText(text); - return cocos2d::Size(s[0], s[1]); + return cc::Size(s[0], s[1]); } CanvasGradient* CanvasRenderingContext2D::createLinearGradient(float x0, float y0, float x1, float y1) @@ -864,4 +864,4 @@ void CanvasRenderingContext2D::setTransform(float a, float b, float c, float d, //SE_LOGE("%s isn't implemented!\n", __FUNCTION__); } -NS_CC_END +} diff --git a/native/cocos/platform/win32/CCDevice-win32.cpp b/native/cocos/platform/win32/CCDevice-win32.cpp index 4081665fd6..0eeaea5162 100644 --- a/native/cocos/platform/win32/CCDevice-win32.cpp +++ b/native/cocos/platform/win32/CCDevice-win32.cpp @@ -31,7 +31,7 @@ THE SOFTWARE. #include "platform/CCFileUtils.h" #include "platform/CCStdC.h" -NS_CC_BEGIN +namespace cc { int Device::getDPI() { @@ -90,10 +90,10 @@ Device::NetworkType Device::getNetworkType() return Device::NetworkType::LAN; } -cocos2d::Vec4 Device::getSafeAreaEdge() +cc::Vec4 Device::getSafeAreaEdge() { // no SafeArea concept on win32, return ZERO Vec4. - return cocos2d::Vec4(); + return cc::Vec4(); } int Device::getDevicePixelRatio() @@ -101,6 +101,6 @@ int Device::getDevicePixelRatio() return 1; } -NS_CC_END +} #endif // CC_PLATFORM == CC_PLATFORM_WINDOWS diff --git a/native/cocos/platform/win32/CCFileUtils-win32.cpp b/native/cocos/platform/win32/CCFileUtils-win32.cpp index 9b0dfe9f4e..2eba6325b6 100644 --- a/native/cocos/platform/win32/CCFileUtils-win32.cpp +++ b/native/cocos/platform/win32/CCFileUtils-win32.cpp @@ -36,7 +36,7 @@ THE SOFTWARE. using namespace std; -NS_CC_BEGIN +namespace cc { #define CC_MAX_PATH 512 @@ -424,6 +424,6 @@ bool FileUtilsWin32::removeDirectory(const std::string& dirPath) return false; } -NS_CC_END +} #endif // CC_PLATFORM == CC_PLATFORM_WINDOWS diff --git a/native/cocos/platform/win32/CCFileUtils-win32.h b/native/cocos/platform/win32/CCFileUtils-win32.h index 1cf2451f04..5955df483b 100644 --- a/native/cocos/platform/win32/CCFileUtils-win32.h +++ b/native/cocos/platform/win32/CCFileUtils-win32.h @@ -34,7 +34,7 @@ THE SOFTWARE. #include #include -NS_CC_BEGIN +namespace cc { /** * @addtogroup platform @@ -136,7 +136,7 @@ protected: // end of platform group /// @} -NS_CC_END +} #endif // CC_PLATFORM == CC_PLATFORM_WINDOWS diff --git a/native/cocos/platform/win32/CCUtils-win32.cpp b/native/cocos/platform/win32/CCUtils-win32.cpp index b54ae592cf..0294a28286 100644 --- a/native/cocos/platform/win32/CCUtils-win32.cpp +++ b/native/cocos/platform/win32/CCUtils-win32.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include #include "base/ccMacros.h" -NS_CC_BEGIN +namespace cc { std::wstring StringUtf8ToWideChar(const std::string& strUtf8) { @@ -105,4 +105,4 @@ std::string UTF8StringToMultiByte(const std::string& strUtf8) return ret; } -NS_CC_END +} diff --git a/native/cocos/platform/win32/CCUtils-win32.h b/native/cocos/platform/win32/CCUtils-win32.h index 7682d7e7b8..cf3071fba2 100644 --- a/native/cocos/platform/win32/CCUtils-win32.h +++ b/native/cocos/platform/win32/CCUtils-win32.h @@ -31,12 +31,12 @@ THE SOFTWARE. #include -NS_CC_BEGIN +namespace cc { std::wstring CC_DLL StringUtf8ToWideChar(const std::string& strUtf8); std::string CC_DLL StringWideCharToUtf8(const std::wstring& strWideChar); std::string CC_DLL UTF8StringToMultiByte(const std::string& strUtf8); -NS_CC_END +} #endif // __CC_UTILS_WIN32_H__ diff --git a/native/cocos/platform/win32/View-win32.cpp b/native/cocos/platform/win32/View-win32.cpp index 623c68b17c..11ca7899fd 100644 --- a/native/cocos/platform/win32/View-win32.cpp +++ b/native/cocos/platform/win32/View-win32.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include -using namespace cocos2d; +using namespace cc; namespace { @@ -110,7 +110,7 @@ namespace { -NS_CC_BEGIN +namespace cc { View::View(const std::string & title, int width, int height) : _title(title), _width(width), _height(height) @@ -158,9 +158,9 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) if (cnt == 0) return false; *resume = false; *pause = false; - cocos2d::TouchEvent touch; - cocos2d::MouseEvent mouse; - cocos2d::KeyboardEvent keyboard; + cc::TouchEvent touch; + cc::MouseEvent mouse; + cc::KeyboardEvent keyboard; switch (sdlEvent.type) { case SDL_QUIT: @@ -178,7 +178,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) break; case SDL_WINDOWEVENT_SIZE_CHANGED: case SDL_WINDOWEVENT_RESIZED: - cocos2d::EventDispatcher::dispatchResizeEvent(wevent.data1, wevent.data2); + cc::EventDispatcher::dispatchResizeEvent(wevent.data1, wevent.data2); break; case SDL_WINDOWEVENT_HIDDEN: *pause = true; @@ -196,7 +196,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) mouse.x = event.x; mouse.y = event.y; mouse.button = event.button - 1; - cocos2d::EventDispatcher::dispatchMouseEvent(mouse); + cc::EventDispatcher::dispatchMouseEvent(mouse); break; } case SDL_MOUSEBUTTONUP: @@ -206,7 +206,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) mouse.x = event.x; mouse.y = event.y; mouse.button = event.button - 1; - cocos2d::EventDispatcher::dispatchMouseEvent(mouse); + cc::EventDispatcher::dispatchMouseEvent(mouse); break; } case SDL_MOUSEMOTION: @@ -216,7 +216,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) mouse.x = event.x; mouse.y = event.y; mouse.button = 0; - cocos2d::EventDispatcher::dispatchMouseEvent(mouse); + cc::EventDispatcher::dispatchMouseEvent(mouse); break; } case SDL_MOUSEWHEEL: @@ -226,7 +226,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) mouse.x = event.x; mouse.y = event.y; mouse.button = 0; //TODO: direction - cocos2d::EventDispatcher::dispatchMouseEvent(mouse); + cc::EventDispatcher::dispatchMouseEvent(mouse); break; } case SDL_FINGERUP: @@ -234,7 +234,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) SDL_TouchFingerEvent& event = sdlEvent.tfinger; touch.type = TouchEvent::Type::ENDED; touch.touches = { TouchInfo(event.x, event.y, (int)event.fingerId) }; - cocos2d::EventDispatcher::dispatchTouchEvent(touch); + cc::EventDispatcher::dispatchTouchEvent(touch); break; } case SDL_FINGERDOWN: @@ -242,7 +242,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) SDL_TouchFingerEvent& event = sdlEvent.tfinger; touch.type = TouchEvent::Type::BEGAN; touch.touches = { TouchInfo(event.x, event.y, (int)event.fingerId) }; - cocos2d::EventDispatcher::dispatchTouchEvent(touch); + cc::EventDispatcher::dispatchTouchEvent(touch); break; } case SDL_FINGERMOTION: @@ -250,7 +250,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) SDL_TouchFingerEvent& event = sdlEvent.tfinger; touch.type = TouchEvent::Type::MOVED; touch.touches = { TouchInfo(event.x, event.y, (int)event.fingerId) }; - cocos2d::EventDispatcher::dispatchTouchEvent(touch); + cc::EventDispatcher::dispatchTouchEvent(touch); break; } case SDL_KEYDOWN: @@ -263,7 +263,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) keyboard.ctrlKeyActive = mode & KMOD_CTRL; keyboard.shiftKeyActive = mode & KMOD_SHIFT; //CCLOG("==> key %d -> code %d", event.keysym.sym, keyboard.key); - cocos2d::EventDispatcher::dispatchKeyboardEvent(keyboard); + cc::EventDispatcher::dispatchKeyboardEvent(keyboard); break; } case SDL_KEYUP: @@ -275,7 +275,7 @@ bool View::pollEvent(bool * quit, bool *resume, bool *pause) keyboard.altKeyActive = mode & KMOD_ALT; keyboard.ctrlKeyActive = mode & KMOD_CTRL; keyboard.shiftKeyActive = mode & KMOD_SHIFT; - cocos2d::EventDispatcher::dispatchKeyboardEvent(keyboard); + cc::EventDispatcher::dispatchKeyboardEvent(keyboard); break; } default: @@ -300,4 +300,4 @@ void View::setCursorEnabeld(bool enable) SDL_SetRelativeMouseMode(enable ? SDL_FALSE : SDL_TRUE); } -NS_CC_END +} diff --git a/native/cocos/platform/win32/View-win32.h b/native/cocos/platform/win32/View-win32.h index 4eaee33bba..01119cb437 100644 --- a/native/cocos/platform/win32/View-win32.h +++ b/native/cocos/platform/win32/View-win32.h @@ -39,7 +39,7 @@ THE SOFTWARE. #include "scripting/js-bindings/event/EventDispatcher.h" -NS_CC_BEGIN +namespace cc { class View { public: @@ -70,4 +70,4 @@ private: }; -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXBindingLayout.cc b/native/cocos/renderer/core/gfx/GFXBindingLayout.cc index a56fc1595f..59e18dab1f 100755 --- a/native/cocos/renderer/core/gfx/GFXBindingLayout.cc +++ b/native/cocos/renderer/core/gfx/GFXBindingLayout.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXBindingLayout.h" -NS_CC_BEGIN +namespace cc { GFXBindingLayout::GFXBindingLayout(GFXDevice *device) : GFXObject(GFXObjectType::BINDING_LAYOUT), _device(device) { @@ -61,4 +61,4 @@ void GFXBindingLayout::bindSampler(uint binding, GFXSampler *sampler) { } } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXBindingLayout.h b/native/cocos/renderer/core/gfx/GFXBindingLayout.h index c430b22c2d..c4296a72bb 100755 --- a/native/cocos/renderer/core/gfx/GFXBindingLayout.h +++ b/native/cocos/renderer/core/gfx/GFXBindingLayout.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXBindingLayout : public GFXObject { public: @@ -28,6 +28,6 @@ protected: bool _isDirty = false; }; -NS_CC_END +} #endif // CC_CORE_GFX_BINDING_LAYOUT_H_ diff --git a/native/cocos/renderer/core/gfx/GFXBuffer.cc b/native/cocos/renderer/core/gfx/GFXBuffer.cc index 6ba3eead71..4c856b0908 100755 --- a/native/cocos/renderer/core/gfx/GFXBuffer.cc +++ b/native/cocos/renderer/core/gfx/GFXBuffer.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXBuffer.h" -NS_CC_BEGIN +namespace cc { GFXBuffer::GFXBuffer(GFXDevice *device) : GFXObject(GFXObjectType::BUFFER), _device(device) { @@ -10,4 +10,4 @@ GFXBuffer::GFXBuffer(GFXDevice *device) GFXBuffer::~GFXBuffer() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXBuffer.h b/native/cocos/renderer/core/gfx/GFXBuffer.h index fc0f04e24b..382c0ed0e3 100755 --- a/native/cocos/renderer/core/gfx/GFXBuffer.h +++ b/native/cocos/renderer/core/gfx/GFXBuffer.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXBuffer : public GFXObject { public: @@ -36,6 +36,6 @@ protected: uint8_t *_buffer = nullptr; }; -NS_CC_END +} #endif // CC_CORE_GFX_BUFFER_H_ diff --git a/native/cocos/renderer/core/gfx/GFXCommand.h b/native/cocos/renderer/core/gfx/GFXCommand.h index 6dd2bc3290..b8809112a5 100644 --- a/native/cocos/renderer/core/gfx/GFXCommand.h +++ b/native/cocos/renderer/core/gfx/GFXCommand.h @@ -1,6 +1,6 @@ #pragma once -NS_CC_BEGIN +namespace cc { enum class GFXCmdType : uint8_t { BEGIN_RENDER_PASS, @@ -23,4 +23,4 @@ public: virtual void clear() = 0; }; -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXCommandAllocator.cc b/native/cocos/renderer/core/gfx/GFXCommandAllocator.cc index 29f33f6fd7..3e78ba8a88 100755 --- a/native/cocos/renderer/core/gfx/GFXCommandAllocator.cc +++ b/native/cocos/renderer/core/gfx/GFXCommandAllocator.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXCommandAllocator.h" -NS_CC_BEGIN +namespace cc { GFXCommandAllocator::GFXCommandAllocator(GFXDevice *device) : GFXObject(GFXObjectType::COMMAND_ALLOCATOR), _device(device) { @@ -10,4 +10,4 @@ GFXCommandAllocator::GFXCommandAllocator(GFXDevice *device) GFXCommandAllocator::~GFXCommandAllocator() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXCommandAllocator.h b/native/cocos/renderer/core/gfx/GFXCommandAllocator.h index 2fbf6f1bbf..5ff753bf4a 100755 --- a/native/cocos/renderer/core/gfx/GFXCommandAllocator.h +++ b/native/cocos/renderer/core/gfx/GFXCommandAllocator.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXCommandAllocator : public GFXObject { public: @@ -20,6 +20,6 @@ protected: GFXDevice *_device = nullptr; }; -NS_CC_END +} #endif // CC_CORE_GFX_COMMAND_ALLOCATOR_H_ diff --git a/native/cocos/renderer/core/gfx/GFXCommandBuffer.cc b/native/cocos/renderer/core/gfx/GFXCommandBuffer.cc index cd23965304..24380b0f19 100755 --- a/native/cocos/renderer/core/gfx/GFXCommandBuffer.cc +++ b/native/cocos/renderer/core/gfx/GFXCommandBuffer.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXCommandBuffer.h" -NS_CC_BEGIN +namespace cc { GFXCommandBuffer::GFXCommandBuffer(GFXDevice *device) : GFXObject(GFXObjectType::COMMAND_BUFFER), _device(device) { @@ -10,4 +10,4 @@ GFXCommandBuffer::GFXCommandBuffer(GFXDevice *device) GFXCommandBuffer::~GFXCommandBuffer() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXCommandBuffer.h b/native/cocos/renderer/core/gfx/GFXCommandBuffer.h index 3dbcef33fb..0b45b28126 100755 --- a/native/cocos/renderer/core/gfx/GFXCommandBuffer.h +++ b/native/cocos/renderer/core/gfx/GFXCommandBuffer.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXCommandBuffer : public GFXObject { public: @@ -49,6 +49,6 @@ protected: uint32_t _numTriangles = 0; }; -NS_CC_END +} #endif // CC_CORE_GFX_COMMAND_ALLOCATOR_H_ diff --git a/native/cocos/renderer/core/gfx/GFXCommandPool.h b/native/cocos/renderer/core/gfx/GFXCommandPool.h index 9e10c491d6..3c0bf53694 100644 --- a/native/cocos/renderer/core/gfx/GFXCommandPool.h +++ b/native/cocos/renderer/core/gfx/GFXCommandPool.h @@ -2,7 +2,7 @@ #include "GFXCommand.h" -NS_CC_BEGIN +namespace cc { #define INITIAL_CAPACITY 1 @@ -85,4 +85,4 @@ private: int _freeIdx = 0; }; -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXContext.cc b/native/cocos/renderer/core/gfx/GFXContext.cc index a41cff4133..232a230565 100755 --- a/native/cocos/renderer/core/gfx/GFXContext.cc +++ b/native/cocos/renderer/core/gfx/GFXContext.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXContext.h" -NS_CC_BEGIN +namespace cc { GFXContext::GFXContext(GFXDevice *device) : _device(device) { @@ -10,4 +10,4 @@ GFXContext::GFXContext(GFXDevice *device) GFXContext::~GFXContext() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXContext.h b/native/cocos/renderer/core/gfx/GFXContext.h index 01a420fee3..eae7645b11 100755 --- a/native/cocos/renderer/core/gfx/GFXContext.h +++ b/native/cocos/renderer/core/gfx/GFXContext.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXContext : public Object { public: @@ -30,6 +30,6 @@ protected: GFXFormat _depthStencilFmt = GFXFormat::UNKNOWN; }; -NS_CC_END +} #endif // CC_CORE_GFX_CONTEXT_H_ diff --git a/native/cocos/renderer/core/gfx/GFXDef.cc b/native/cocos/renderer/core/gfx/GFXDef.cc index 0840fbeaaa..bad3f8f303 100755 --- a/native/cocos/renderer/core/gfx/GFXDef.cc +++ b/native/cocos/renderer/core/gfx/GFXDef.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { const GFXFormatInfo GFX_FORMAT_INFOS[] = { {"UNKNOWN", 0, 0, GFXFormatType::NONE, false, false, false, false}, @@ -207,4 +207,4 @@ uint GFXFormatSurfaceSize(GFXFormat format, uint width, uint height, uint depth, return size; } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXDef.h b/native/cocos/renderer/core/gfx/GFXDef.h index ed7d02966c..7f30ebb28f 100755 --- a/native/cocos/renderer/core/gfx/GFXDef.h +++ b/native/cocos/renderer/core/gfx/GFXDef.h @@ -1,7 +1,7 @@ #ifndef CC_CORE_GFX_DEF_H_ #define CC_CORE_GFX_DEF_H_ -NS_CC_BEGIN +namespace cc { class GFXDevice; class GFXBuffer; @@ -1027,6 +1027,6 @@ extern CC_CORE_API uint GFXFormatSize(GFXFormat format, uint width, uint height, extern CC_CORE_API uint GFXFormatSurfaceSize(GFXFormat format, uint width, uint height, uint depth, uint mips); -NS_CC_END +} #endif // CC_CORE_GFX_DEF_H_ diff --git a/native/cocos/renderer/core/gfx/GFXDevice.cc b/native/cocos/renderer/core/gfx/GFXDevice.cc index 19b14b21d5..be1700d9b9 100755 --- a/native/cocos/renderer/core/gfx/GFXDevice.cc +++ b/native/cocos/renderer/core/gfx/GFXDevice.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXDevice.h" #include "GFXContext.h" -NS_CC_BEGIN +namespace cc { GFXDevice::GFXDevice() { memset(_features, 0, sizeof(_features)); @@ -18,4 +18,4 @@ GFXFormat GFXDevice::getDepthStencilFormat() const { return _context->getDepthStencilFormat(); } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXDevice.h b/native/cocos/renderer/core/gfx/GFXDevice.h index a3ebcb17ce..5a16e7af3d 100755 --- a/native/cocos/renderer/core/gfx/GFXDevice.h +++ b/native/cocos/renderer/core/gfx/GFXDevice.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXDevice : public Object { public: @@ -106,6 +106,6 @@ protected: float _projectionSignY = 1.0f; }; -NS_CC_END +} #endif // CC_CORE_GFX_DEVICE_H_ diff --git a/native/cocos/renderer/core/gfx/GFXFence.cc b/native/cocos/renderer/core/gfx/GFXFence.cc index 0e283ba5e2..28dcaec3f7 100644 --- a/native/cocos/renderer/core/gfx/GFXFence.cc +++ b/native/cocos/renderer/core/gfx/GFXFence.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXFence.h" -NS_CC_BEGIN +namespace cc { GFXFence::GFXFence(GFXDevice *device) : GFXObject(GFXObjectType::FENCE), _device(device) { @@ -10,4 +10,4 @@ GFXFence::GFXFence(GFXDevice *device) GFXFence::~GFXFence() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXFence.h b/native/cocos/renderer/core/gfx/GFXFence.h index 3054f1840f..05014cf630 100644 --- a/native/cocos/renderer/core/gfx/GFXFence.h +++ b/native/cocos/renderer/core/gfx/GFXFence.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXFence : public GFXObject { public: @@ -20,6 +20,6 @@ protected: GFXDevice *_device = nullptr; }; -NS_CC_END +} #endif // CC_CORE_GFX_FENCE_H_ diff --git a/native/cocos/renderer/core/gfx/GFXFramebuffer.cc b/native/cocos/renderer/core/gfx/GFXFramebuffer.cc index 6fd0f40c6f..73de713d80 100755 --- a/native/cocos/renderer/core/gfx/GFXFramebuffer.cc +++ b/native/cocos/renderer/core/gfx/GFXFramebuffer.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXFramebuffer.h" -NS_CC_BEGIN +namespace cc { GFXFramebuffer::GFXFramebuffer(GFXDevice *device) : GFXObject(GFXObjectType::FRAMEBUFFER), _device(device) { @@ -10,4 +10,4 @@ GFXFramebuffer::GFXFramebuffer(GFXDevice *device) GFXFramebuffer::~GFXFramebuffer() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXFramebuffer.h b/native/cocos/renderer/core/gfx/GFXFramebuffer.h index 64a0884c2e..bc56eb2082 100755 --- a/native/cocos/renderer/core/gfx/GFXFramebuffer.h +++ b/native/cocos/renderer/core/gfx/GFXFramebuffer.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXFramebuffer : public GFXObject { public: @@ -28,6 +28,6 @@ protected: bool _isOffscreen = true; }; -NS_CC_END +} #endif // CC_CORE_GFX_FRAME_BUFFER_H_ diff --git a/native/cocos/renderer/core/gfx/GFXInputAssembler.cc b/native/cocos/renderer/core/gfx/GFXInputAssembler.cc index dbd1d397a9..eebe2d9d18 100755 --- a/native/cocos/renderer/core/gfx/GFXInputAssembler.cc +++ b/native/cocos/renderer/core/gfx/GFXInputAssembler.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXInputAssembler.h" -NS_CC_BEGIN +namespace cc { GFXInputAssembler::GFXInputAssembler(GFXDevice *device) : GFXObject(GFXObjectType::INPUT_ASSEMBLER), _device(device) { @@ -35,4 +35,4 @@ uint GFXInputAssembler::computeAttributesHash() const { return seed; } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXInputAssembler.h b/native/cocos/renderer/core/gfx/GFXInputAssembler.h index 5195d129a6..f67599159a 100755 --- a/native/cocos/renderer/core/gfx/GFXInputAssembler.h +++ b/native/cocos/renderer/core/gfx/GFXInputAssembler.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXInputAssembler : public GFXObject { public: @@ -56,6 +56,6 @@ protected: uint _attributesHash = 0; }; -NS_CC_END +} #endif // CC_CORE_GFX_INPUT_ASSEMBLER_H_ diff --git a/native/cocos/renderer/core/gfx/GFXObject.cc b/native/cocos/renderer/core/gfx/GFXObject.cc index c03e7ad03c..923ad35fe7 100644 --- a/native/cocos/renderer/core/gfx/GFXObject.cc +++ b/native/cocos/renderer/core/gfx/GFXObject.cc @@ -1,9 +1,9 @@ #include "CoreStd.h" #include "GFXObject.h" -NS_CC_BEGIN +namespace cc { GFXObject::GFXObject(GFXObjectType gfxType) : _gfxType(gfxType) {} -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXObject.h b/native/cocos/renderer/core/gfx/GFXObject.h index b0ce11d7f3..5a99884ef6 100644 --- a/native/cocos/renderer/core/gfx/GFXObject.h +++ b/native/cocos/renderer/core/gfx/GFXObject.h @@ -2,7 +2,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class GFXObject : public Object { public: @@ -17,4 +17,4 @@ protected: GFXStatus _status = GFXStatus::UNREADY; }; -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXPipelineLayout.cc b/native/cocos/renderer/core/gfx/GFXPipelineLayout.cc index 7a1488483c..c43da85e88 100755 --- a/native/cocos/renderer/core/gfx/GFXPipelineLayout.cc +++ b/native/cocos/renderer/core/gfx/GFXPipelineLayout.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXPipelineLayout.h" -NS_CC_BEGIN +namespace cc { GFXPipelineLayout::GFXPipelineLayout(GFXDevice *device) : GFXObject(GFXObjectType::PIPELINE_LAYOUT), _device(device) { @@ -10,4 +10,4 @@ GFXPipelineLayout::GFXPipelineLayout(GFXDevice *device) GFXPipelineLayout::~GFXPipelineLayout() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXPipelineLayout.h b/native/cocos/renderer/core/gfx/GFXPipelineLayout.h index e46caacc47..8b39d81f68 100755 --- a/native/cocos/renderer/core/gfx/GFXPipelineLayout.h +++ b/native/cocos/renderer/core/gfx/GFXPipelineLayout.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXPipelineLayout : public GFXObject { public: @@ -24,6 +24,6 @@ protected: GFXBindingLayoutList _layouts; }; -NS_CC_END +} #endif // CC_CORE_GFX_PIPELINE_LAYOUT_H_ diff --git a/native/cocos/renderer/core/gfx/GFXPipelineState.cc b/native/cocos/renderer/core/gfx/GFXPipelineState.cc index 95f8102d4f..88c857a9b3 100755 --- a/native/cocos/renderer/core/gfx/GFXPipelineState.cc +++ b/native/cocos/renderer/core/gfx/GFXPipelineState.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXPipelineState.h" -NS_CC_BEGIN +namespace cc { GFXPipelineState::GFXPipelineState(GFXDevice *device) : GFXObject(GFXObjectType::PIPELINE_STATE), _device(device) { @@ -10,4 +10,4 @@ GFXPipelineState::GFXPipelineState(GFXDevice *device) GFXPipelineState::~GFXPipelineState() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXPipelineState.h b/native/cocos/renderer/core/gfx/GFXPipelineState.h index 7b80ded22c..942b22696d 100755 --- a/native/cocos/renderer/core/gfx/GFXPipelineState.h +++ b/native/cocos/renderer/core/gfx/GFXPipelineState.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXPipelineState : public GFXObject { public: @@ -38,6 +38,6 @@ protected: GFXRenderPass *_renderPass = nullptr; }; -NS_CC_END +} #endif // CC_CORE_GFX_PIPELINE_STATE_H_ diff --git a/native/cocos/renderer/core/gfx/GFXQueue.cc b/native/cocos/renderer/core/gfx/GFXQueue.cc index 52099a5fb8..6b0e52cbcc 100755 --- a/native/cocos/renderer/core/gfx/GFXQueue.cc +++ b/native/cocos/renderer/core/gfx/GFXQueue.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXQueue.h" -NS_CC_BEGIN +namespace cc { GFXQueue::GFXQueue(GFXDevice *device) : GFXObject(GFXObjectType::QUEUE), _device(device) { @@ -10,4 +10,4 @@ GFXQueue::GFXQueue(GFXDevice *device) GFXQueue::~GFXQueue() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXQueue.h b/native/cocos/renderer/core/gfx/GFXQueue.h index 2fa4e893db..1bc3fcaa38 100755 --- a/native/cocos/renderer/core/gfx/GFXQueue.h +++ b/native/cocos/renderer/core/gfx/GFXQueue.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXQueue : public GFXObject { public: @@ -24,6 +24,6 @@ protected: GFXQueueType _type = GFXQueueType::GRAPHICS; }; -NS_CC_END +} #endif // CC_CORE_GFX_QUEUE_H_ diff --git a/native/cocos/renderer/core/gfx/GFXRenderPass.cc b/native/cocos/renderer/core/gfx/GFXRenderPass.cc index e5c9ca8fda..bf35a92cc2 100755 --- a/native/cocos/renderer/core/gfx/GFXRenderPass.cc +++ b/native/cocos/renderer/core/gfx/GFXRenderPass.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXRenderPass.h" -NS_CC_BEGIN +namespace cc { GFXRenderPass::GFXRenderPass(GFXDevice *device) : GFXObject(GFXObjectType::RENDER_PASS), _device(device) { @@ -36,4 +36,4 @@ uint GFXRenderPass::computeHash() const { return seed; } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXRenderPass.h b/native/cocos/renderer/core/gfx/GFXRenderPass.h index efa39c7576..c1f3eca8e5 100755 --- a/native/cocos/renderer/core/gfx/GFXRenderPass.h +++ b/native/cocos/renderer/core/gfx/GFXRenderPass.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXRenderPass : public GFXObject { public: @@ -30,6 +30,6 @@ protected: uint _hash = 0; }; -NS_CC_END +} #endif // CC_CORE_GFX_RENDER_PASS_H_ diff --git a/native/cocos/renderer/core/gfx/GFXSampler.cc b/native/cocos/renderer/core/gfx/GFXSampler.cc index 3ee8008272..b0e787741b 100755 --- a/native/cocos/renderer/core/gfx/GFXSampler.cc +++ b/native/cocos/renderer/core/gfx/GFXSampler.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXSampler.h" -NS_CC_BEGIN +namespace cc { GFXSampler::GFXSampler(GFXDevice *device) : GFXObject(GFXObjectType::SAMPLER), _device(device) { @@ -14,4 +14,4 @@ GFXSampler::GFXSampler(GFXDevice *device) GFXSampler::~GFXSampler() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXSampler.h b/native/cocos/renderer/core/gfx/GFXSampler.h index 5a7ebdcc4c..790963479c 100755 --- a/native/cocos/renderer/core/gfx/GFXSampler.h +++ b/native/cocos/renderer/core/gfx/GFXSampler.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXSampler : public GFXObject { public: @@ -46,6 +46,6 @@ protected: float _mipLODBias = 0.0f; }; -NS_CC_END +} #endif // CC_CORE_GFX_SAMPLER_H_ diff --git a/native/cocos/renderer/core/gfx/GFXShader.cc b/native/cocos/renderer/core/gfx/GFXShader.cc index 3af2707e71..9dbd16e833 100755 --- a/native/cocos/renderer/core/gfx/GFXShader.cc +++ b/native/cocos/renderer/core/gfx/GFXShader.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXShader.h" -NS_CC_BEGIN +namespace cc { GFXShader::GFXShader(GFXDevice *device) : GFXObject(GFXObjectType::SHADER), _device(device) { @@ -10,4 +10,4 @@ GFXShader::GFXShader(GFXDevice *device) GFXShader::~GFXShader() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXShader.h b/native/cocos/renderer/core/gfx/GFXShader.h index 4ed22ce137..5bc4bce592 100755 --- a/native/cocos/renderer/core/gfx/GFXShader.h +++ b/native/cocos/renderer/core/gfx/GFXShader.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXShader : public GFXObject { public: @@ -33,6 +33,6 @@ protected: GFXUniformSamplerList _samplers; }; -NS_CC_END +} #endif // CC_CORE_GFX_TEXTURE_VIEW_H_ diff --git a/native/cocos/renderer/core/gfx/GFXTexture.cc b/native/cocos/renderer/core/gfx/GFXTexture.cc index 73885bc4ad..f4affcf169 100755 --- a/native/cocos/renderer/core/gfx/GFXTexture.cc +++ b/native/cocos/renderer/core/gfx/GFXTexture.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "GFXTexture.h" -NS_CC_BEGIN +namespace cc { GFXTexture::GFXTexture(GFXDevice *device) : GFXObject(GFXObjectType::TEXTURE), _device(device) { @@ -10,4 +10,4 @@ GFXTexture::GFXTexture(GFXDevice *device) GFXTexture::~GFXTexture() { } -NS_CC_END +} diff --git a/native/cocos/renderer/core/gfx/GFXTexture.h b/native/cocos/renderer/core/gfx/GFXTexture.h index 901f43854c..2bdfe433cd 100755 --- a/native/cocos/renderer/core/gfx/GFXTexture.h +++ b/native/cocos/renderer/core/gfx/GFXTexture.h @@ -3,7 +3,7 @@ #include "GFXDef.h" -NS_CC_BEGIN +namespace cc { class CC_CORE_API GFXTexture : public GFXObject { public: @@ -45,6 +45,6 @@ protected: uint8_t *_buffer = nullptr; }; -NS_CC_END +} #endif // CC_CORE_GFX_TEXTURE_H_ diff --git a/native/cocos/renderer/core/kernel/Assertion.cc b/native/cocos/renderer/core/kernel/Assertion.cc index 45c7d857d9..339e870c55 100755 --- a/native/cocos/renderer/core/kernel/Assertion.cc +++ b/native/cocos/renderer/core/kernel/Assertion.cc @@ -11,7 +11,7 @@ # include #endif -NS_CC_BEGIN +namespace cc { #if (CC_PLATFORM == CC_PLATFORM_WINDOWS) @@ -147,4 +147,4 @@ void _ExecAssertOutput(const char* condition, const char* filename, int line, co #endif } -NS_CC_END +} diff --git a/native/cocos/renderer/core/kernel/Assertion.h b/native/cocos/renderer/core/kernel/Assertion.h index dbf0c82a11..f08e2b721f 100755 --- a/native/cocos/renderer/core/kernel/Assertion.h +++ b/native/cocos/renderer/core/kernel/Assertion.h @@ -1,7 +1,7 @@ #ifndef CC_CORE_KERNEL_ASSERTION_H_ #define CC_CORE_KERNEL_ASSERTION_H_ -NS_CC_BEGIN +namespace cc { //#if defined(__GNUC__) #if 0 @@ -17,16 +17,16 @@ CC_CORE_API void _ExecAssertOutput(const char *condition, const char *fileName, //#if (CC_MODE == CC_MODE_DEBUG) //# if (CC_PLATFORM == CC_PLATFORM_WINDOWS) -//# define CCASSERT(x, formats, ...) if(UNLIKELY(!(x))) {if(cocos2d::_ExecAssert(#x, __FILE__, __LINE__, formats, ##__VA_ARGS__)) __debugbreak();} +//# define CCASSERT(x, formats, ...) if(UNLIKELY(!(x))) {if(cc::_ExecAssert(#x, __FILE__, __LINE__, formats, ##__VA_ARGS__)) __debugbreak();} //# else -//# define CCASSERT(x, formats, ...) if(UNLIKELY(!(x))) {cocos2d::_ExecAssert(#x, __FILE__, __LINE__, formats, ##__VA_ARGS__); assert(x);} +//# define CCASSERT(x, formats, ...) if(UNLIKELY(!(x))) {cc::_ExecAssert(#x, __FILE__, __LINE__, formats, ##__VA_ARGS__); assert(x);} //# endif //#else -//# define CCASSERT(x, formats, ...) if(UNLIKELY(!(x))) {cocos2d::_ExecAssertOutput(#x, __FILE__, __LINE__, "");} +//# define CCASSERT(x, formats, ...) if(UNLIKELY(!(x))) {cc::_ExecAssertOutput(#x, __FILE__, __LINE__, "");} //#endif //#define CCASSERT(x) CCASSERT(x, "%s", "") -NS_CC_END +} #endif // CC_CORE_KERNEL_ASSERTION_H_ diff --git a/native/cocos/renderer/core/kernel/CachedArray.h b/native/cocos/renderer/core/kernel/CachedArray.h index dbd271692d..31f4c632e0 100755 --- a/native/cocos/renderer/core/kernel/CachedArray.h +++ b/native/cocos/renderer/core/kernel/CachedArray.h @@ -1,7 +1,7 @@ #ifndef CC_CORE_KERNEL_CACHED_ARRAY_H_ #define CC_CORE_KERNEL_CACHED_ARRAY_H_ -NS_CC_BEGIN +namespace cc { template class CachedArray { @@ -72,6 +72,6 @@ class CachedArray { T* _array = nullptr; }; -NS_CC_END +} #endif // CC_CORE_KERNEL_CACHED_ARRAY_H_ diff --git a/native/cocos/renderer/core/kernel/Log.cc b/native/cocos/renderer/core/kernel/Log.cc index 75084b1fec..fa5cdece9c 100755 --- a/native/cocos/renderer/core/kernel/Log.cc +++ b/native/cocos/renderer/core/kernel/Log.cc @@ -21,7 +21,7 @@ # include #endif -NS_CC_BEGIN +namespace cc { #define LOG_USE_TIMESTAMP LogLevel Log::log_level = LogLevel::DEBUG; @@ -142,4 +142,4 @@ void Log::LogMessage(LogType type, LogLevel level, const char* formats, ...) { #endif } -NS_CC_END +} diff --git a/native/cocos/renderer/core/kernel/Log.h b/native/cocos/renderer/core/kernel/Log.h index 6805b60e00..e6d3a3640f 100755 --- a/native/cocos/renderer/core/kernel/Log.h +++ b/native/cocos/renderer/core/kernel/Log.h @@ -3,7 +3,7 @@ #include -NS_CC_BEGIN +namespace cc { enum class LogType: uint8_t { KERNEL, @@ -34,13 +34,13 @@ class CC_CORE_API Log { static FILE* log_file_; }; -NS_CC_END +} -#define CC_LOG_DEBUG(formats, ...) if(cocos2d::Log::log_level >= cocos2d::LogLevel::DEBUG) cocos2d::Log::LogMessage(cocos2d::LogType::KERNEL, cocos2d::LogLevel::DEBUG, formats, ##__VA_ARGS__) -#define CC_LOG_INFO(formats, ...) if(cocos2d::Log::log_level >= cocos2d::LogLevel::INFO) cocos2d::Log::LogMessage(cocos2d::LogType::KERNEL, cocos2d::LogLevel::INFO, formats, ##__VA_ARGS__) -#define CC_LOG_WARNING(formats, ...) if(cocos2d::Log::log_level >= cocos2d::LogLevel::WARN) cocos2d::Log::LogMessage(cocos2d::LogType::KERNEL, cocos2d::LogLevel::WARN, formats, ##__VA_ARGS__) -#define CC_LOG_ERROR_(formats, ...) if(cocos2d::Log::log_level >= cocos2d::LogLevel::ERR) cocos2d::Log::LogMessage(cocos2d::LogType::KERNEL, cocos2d::LogLevel::ERR, formats, ##__VA_ARGS__) -#define CC_LOG_FATAL(formats, ...) if(cocos2d::Log::logLevel >= cocos2d::LogLevel::FATAL) cocos2d::Log::LogMessage(cocos2d::LogType::KERNEL, cocos2d::LogLevel::FATAL, formats, ##__VA_ARGS__) +#define CC_LOG_DEBUG(formats, ...) if(cc::Log::log_level >= cc::LogLevel::DEBUG) cc::Log::LogMessage(cc::LogType::KERNEL, cc::LogLevel::DEBUG, formats, ##__VA_ARGS__) +#define CC_LOG_INFO(formats, ...) if(cc::Log::log_level >= cc::LogLevel::INFO) cc::Log::LogMessage(cc::LogType::KERNEL, cc::LogLevel::INFO, formats, ##__VA_ARGS__) +#define CC_LOG_WARNING(formats, ...) if(cc::Log::log_level >= cc::LogLevel::WARN) cc::Log::LogMessage(cc::LogType::KERNEL, cc::LogLevel::WARN, formats, ##__VA_ARGS__) +#define CC_LOG_ERROR_(formats, ...) if(cc::Log::log_level >= cc::LogLevel::ERR) cc::Log::LogMessage(cc::LogType::KERNEL, cc::LogLevel::ERR, formats, ##__VA_ARGS__) +#define CC_LOG_FATAL(formats, ...) if(cc::Log::logLevel >= cc::LogLevel::FATAL) cc::Log::LogMessage(cc::LogType::KERNEL, cc::LogLevel::FATAL, formats, ##__VA_ARGS__) #define CC_LOG_ERROR(formats, ...) do {CC_LOG_ERROR_("[ERROR] file %s: line %d ", __FILE__, __LINE__); CC_LOG_ERROR_(formats, ##__VA_ARGS__); } while(0) diff --git a/native/cocos/renderer/core/kernel/Object.h b/native/cocos/renderer/core/kernel/Object.h index ed773ca0ef..5b310ed329 100755 --- a/native/cocos/renderer/core/kernel/Object.h +++ b/native/cocos/renderer/core/kernel/Object.h @@ -1,11 +1,11 @@ #ifndef CC_CORE_KERNEL_OBJECT_H_ #define CC_CORE_KERNEL_OBJECT_H_ -NS_CC_BEGIN +namespace cc { // Now define all the base classes for each allocation typedef AllocatedObject Object; -NS_CC_END +} #endif // CC_CORE_KERNEL_OBJECT_H_ diff --git a/native/cocos/renderer/core/kernel/UTFString.cc b/native/cocos/renderer/core/kernel/UTFString.cc index 863487b634..fc3c5f2f81 100755 --- a/native/cocos/renderer/core/kernel/UTFString.cc +++ b/native/cocos/renderer/core/kernel/UTFString.cc @@ -1,7 +1,7 @@ #include "CoreStd.h" #include "UTFString.h" -NS_CC_BEGIN +namespace cc { UTFString::unicode_char UTFString::_base_iterator::_getCharacter() const { return string_->getChar(_get_index()); @@ -588,4 +588,4 @@ void UTFString::_load_buffer_WStr() const { #endif } -NS_CC_END +} diff --git a/native/cocos/renderer/core/kernel/UTFString.h b/native/cocos/renderer/core/kernel/UTFString.h index 9358aa0fda..320ea0fea3 100755 --- a/native/cocos/renderer/core/kernel/UTFString.h +++ b/native/cocos/renderer/core/kernel/UTFString.h @@ -17,7 +17,7 @@ namespace std { #include "memory/StlAlloc.h" -NS_CC_BEGIN +namespace cc { /* READ THIS NOTICE BEFORE USING IN YOUR OWN APPLICATIONS =NOTICE= @@ -1560,6 +1560,6 @@ inline bool operator<=( const UTFString::_const_rev_iterator& left, const UTFStr inline bool operator>( const UTFString::_const_rev_iterator& left, const UTFString::_const_rev_iterator& right ) { return right.iter_ > left.iter_; } inline bool operator>=( const UTFString::_const_rev_iterator& left, const UTFString::_const_rev_iterator& right ) { return right.iter_ >= left.iter_; } -NS_CC_END +} #endif // CC_CORE_KERNEL_UTF_STRING_H_ diff --git a/native/cocos/renderer/core/math/CCCoreMath.h b/native/cocos/renderer/core/math/CCCoreMath.h index 64be2f03c5..16c4aa9f75 100755 --- a/native/cocos/renderer/core/math/CCCoreMath.h +++ b/native/cocos/renderer/core/math/CCCoreMath.h @@ -1,7 +1,7 @@ #ifndef CC_CORE_MATH_CC_MATH_H_ #define CC_CORE_MATH_CC_MATH_H_ -#define CC_MATH_NAMESPACE_BEGIN namespace cocos2d { namespace math { +#define CC_MATH_NAMESPACE_BEGIN namespace cc { namespace math { #define CC_MATH_NAMESPACE_END }} CC_MATH_NAMESPACE_BEGIN diff --git a/native/cocos/renderer/core/memory/AllocatedObj.cc b/native/cocos/renderer/core/memory/AllocatedObj.cc index dc679e37e5..2241667f50 100755 --- a/native/cocos/renderer/core/memory/AllocatedObj.cc +++ b/native/cocos/renderer/core/memory/AllocatedObj.cc @@ -2,7 +2,7 @@ #include "MemDef.h" #include "AllocatedObj.h" -NS_CC_BEGIN +namespace cc { /* The problem is that operator new/delete are *implicitly* static. We have to @@ -12,4 +12,4 @@ NS_CC_BEGIN template class AllocatedObject; -NS_CC_END +} diff --git a/native/cocos/renderer/core/memory/AllocatedObj.h b/native/cocos/renderer/core/memory/AllocatedObj.h index 5c2b38e516..4feda48291 100755 --- a/native/cocos/renderer/core/memory/AllocatedObj.h +++ b/native/cocos/renderer/core/memory/AllocatedObj.h @@ -12,7 +12,7 @@ #include "core/CoreDef.h" -NS_CC_BEGIN +namespace cc { /** Superclass for all objects that wish to use custom memory allocators when their new / delete operators are called. @@ -76,6 +76,6 @@ class CC_CORE_API AllocatedObject } }; -NS_CC_END +} #endif // CC_CORE_ALLOCATED_OBJ_H_ diff --git a/native/cocos/renderer/core/memory/JeAlloc.cc b/native/cocos/renderer/core/memory/JeAlloc.cc index 59b5883009..1130d48275 100755 --- a/native/cocos/renderer/core/memory/JeAlloc.cc +++ b/native/cocos/renderer/core/memory/JeAlloc.cc @@ -7,7 +7,7 @@ #include "jemalloc/jemalloc.h" extern const char* je_malloc_conf = "narenas:4"; -NS_CC_BEGIN +namespace cc { #ifdef CC_MEMORY_TRACKER #define MEM_CHECKTAG_SIZE 4 @@ -148,6 +148,6 @@ void JeAllocImpl::TrimAlloc() { je_mallctl(buf, NULL, NULL, NULL, 0); } -NS_CC_END +} #endif // end - #ifdef CC_MEMORY_ALLOCATOR_JEMALLOC diff --git a/native/cocos/renderer/core/memory/JeAlloc.h b/native/cocos/renderer/core/memory/JeAlloc.h index f7e0405a31..e40e8bcc90 100755 --- a/native/cocos/renderer/core/memory/JeAlloc.h +++ b/native/cocos/renderer/core/memory/JeAlloc.h @@ -3,7 +3,7 @@ #if (CC_MEMORY_ALLOCATOR == CC_MEMORY_ALLOCATOR_JEMALLOC) -NS_CC_BEGIN +namespace cc { //Non-templated utility class just to hide jemalloc. class CC_CORE_API JeAllocImpl { @@ -53,7 +53,7 @@ class CC_CORE_API JeAllocPolicy { JeAllocPolicy() {} }; -NS_CC_END +} #endif // end - #ifdef COCOS_MEMORY_ALLOCATOR_JEMALLOC diff --git a/native/cocos/renderer/core/memory/MemDef.h b/native/cocos/renderer/core/memory/MemDef.h index 323a625dc8..94d36daa41 100755 --- a/native/cocos/renderer/core/memory/MemDef.h +++ b/native/cocos/renderer/core/memory/MemDef.h @@ -6,7 +6,7 @@ #include "NedPooling.h" #include "JeAlloc.h" -NS_CC_BEGIN +namespace cc { #if (CC_MEMORY_ALLOCATOR == CC_MEMORY_ALLOCATOR_STD) @@ -58,35 +58,35 @@ T* ConstructN(T* basePtr, size_t count) { return basePtr; } -NS_CC_END +} #ifdef CC_MEMORY_TRACKER /// Allocate a block of raw memory. -# define _CC_MALLOC(bytes) ::cocos2d::CategorisedAllocPolicy::AllocateBytes(bytes, __FILE__, __LINE__, __FUNCTION__) +# define _CC_MALLOC(bytes) ::cc::CategorisedAllocPolicy::AllocateBytes(bytes, __FILE__, __LINE__, __FUNCTION__) /// Reallocate a block of raw memory. -# define _CC_REALLOC(ptr, bytes) ::cocos2d::CategorisedAllocPolicy::ReallocateBytes(ptr, bytes, __FILE__, __LINE__, __FUNCTION__) +# define _CC_REALLOC(ptr, bytes) ::cc::CategorisedAllocPolicy::ReallocateBytes(ptr, bytes, __FILE__, __LINE__, __FUNCTION__) /// Allocate a block of memory for a primitive type. -# define _CC_ALLOC_T(T, count) static_cast(::cocos2d::CategorisedAllocPolicy::AllocateBytes(sizeof(T)*(count), __FILE__, __LINE__, __FUNCTION__)) +# define _CC_ALLOC_T(T, count) static_cast(::cc::CategorisedAllocPolicy::AllocateBytes(sizeof(T)*(count), __FILE__, __LINE__, __FUNCTION__)) /// Free the memory allocated with _CC_MALLOC or _CC_ALLOC_T. -# define _CC_FREE(ptr) ::cocos2d::CategorisedAllocPolicy::DeallocateBytes((void*)ptr) +# define _CC_FREE(ptr) ::cc::CategorisedAllocPolicy::DeallocateBytes((void*)ptr) /// Allocate space for one primitive type, external type or non-virtual type with constructor parameters -# define _CC_NEW_T(T) new (::cocos2d::CategorisedAllocPolicy::AllocateBytes(sizeof(T), __FILE__, __LINE__, __FUNCTION__)) T +# define _CC_NEW_T(T) new (::cc::CategorisedAllocPolicy::AllocateBytes(sizeof(T), __FILE__, __LINE__, __FUNCTION__)) T /// Allocate a block of memory for 'count' primitive types - do not use for classes that inherit from AllocatedObject -# define _CC_NEW_ARRAY_T(T, count) ::cocos2d::ConstructN(static_cast(::cocos2d::CategorisedAllocPolicy::AllocateBytes(sizeof(T)*(count), __FILE__, __LINE__, __FUNCTION__)), count) +# define _CC_NEW_ARRAY_T(T, count) ::cc::ConstructN(static_cast(::cc::CategorisedAllocPolicy::AllocateBytes(sizeof(T)*(count), __FILE__, __LINE__, __FUNCTION__)), count) /// Free the memory allocated with _CC_NEW_T. -# define _CC_DELETE_T(ptr, T) if(ptr){(ptr)->~T(); ::cocos2d::CategorisedAllocPolicy::DeallocateBytes((void*)ptr);} +# define _CC_DELETE_T(ptr, T) if(ptr){(ptr)->~T(); ::cc::CategorisedAllocPolicy::DeallocateBytes((void*)ptr);} /// Free the memory allocated with _CC_NEW_ARRAY_T. -# define _CC_DELETE_ARRAY_T(ptr, T, count) if(ptr){for (size_t b = 0; b < (size_t)count; ++b) {(ptr)[b].~T();} ::cocos2d::CategorisedAllocPolicy::DeallocateBytes((void*)ptr);} +# define _CC_DELETE_ARRAY_T(ptr, T, count) if(ptr){for (size_t b = 0; b < (size_t)count; ++b) {(ptr)[b].~T();} ::cc::CategorisedAllocPolicy::DeallocateBytes((void*)ptr);} // aligned allocation /// Allocate a block of raw memory aligned to user defined boundaries. -# define _CC_MALLOC_ALIGN(bytes, align) ::cocos2d::CategorisedAllocPolicy::AllocateBytesAligned(align, bytes, __FILE__, __LINE__, __FUNCTION__) +# define _CC_MALLOC_ALIGN(bytes, align) ::cc::CategorisedAllocPolicy::AllocateBytesAligned(align, bytes, __FILE__, __LINE__, __FUNCTION__) /// Allocate a block of memory for a primitive type aligned to user defined boundaries. -# define _CC_ALLOC_T_ALIGN(T, count, align) static_cast(::cocos2d::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T)*(count), __FILE__, __LINE__, __FUNCTION__)) +# define _CC_ALLOC_T_ALIGN(T, count, align) static_cast(::cc::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T)*(count), __FILE__, __LINE__, __FUNCTION__)) /// Free the memory allocated with either _CC_MALLOC_ALIGN or _CC_ALLOC_T_ALIGN. -# define _CC_FREE_ALIGN(ptr, align) ::cocos2d::CategorisedAllocPolicy::DeallocateBytesAligned(ptr) +# define _CC_FREE_ALIGN(ptr, align) ::cc::CategorisedAllocPolicy::DeallocateBytesAligned(ptr) /// Allocate a block of raw memory aligned to SIMD boundaries. # define _CC_MALLOC_SIMD(bytes) _CC_MALLOC_ALIGN(bytes, CC_SIMD_ALIGNMENT) /// Allocate a block of memory for a primitive type aligned to SIMD boundaries. @@ -95,13 +95,13 @@ NS_CC_END # define _CC_FREE_SIMD(ptr) _CC_FREE_ALIGN(ptr, CC_SIMD_ALIGNMENT) /// Allocate space for one primitive type, external type or non-virtual type aligned to user defined boundaries -# define _CC_NEW_T_ALIGN(T, align) new (::cocos2d::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T), __FILE__, __LINE__, __FUNCTION__)) T +# define _CC_NEW_T_ALIGN(T, align) new (::cc::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T), __FILE__, __LINE__, __FUNCTION__)) T /// Allocate a block of memory for 'count' primitive types aligned to user defined boundaries - do not use for classes that inherit from AllocatedObject -# define _CC_NEW_ARRAY_T_ALIGN(T, count, align) ::cocos2d::ConstructN(static_cast(::cocos2d::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T)*(count), __FILE__, __LINE__, __FUNCTION__)), count) +# define _CC_NEW_ARRAY_T_ALIGN(T, count, align) ::cc::ConstructN(static_cast(::cc::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T)*(count), __FILE__, __LINE__, __FUNCTION__)), count) /// Free the memory allocated with _CC_NEW_T_ALIGN. -# define _CC_DELETE_T_ALIGN(ptr, T, align) if(ptr){(ptr)->~T(); ::cocos2d::CategorisedAllocPolicy::DeallocateBytesAligned(ptr);} +# define _CC_DELETE_T_ALIGN(ptr, T, align) if(ptr){(ptr)->~T(); ::cc::CategorisedAllocPolicy::DeallocateBytesAligned(ptr);} /// Free the memory allocated with _CC_NEW_ARRAY_T_ALIGN. -# define _CC_DELETE_ARRAY_T_ALIGN(ptr, T, count, align) if(ptr){for (size_t _b = 0; _b < (size_t)count; ++_b) {(ptr)[_b].~T();} ::cocos2d::CategorisedAllocPolicy::DeallocateBytesAligned(ptr);} +# define _CC_DELETE_ARRAY_T_ALIGN(ptr, T, count, align) if(ptr){for (size_t _b = 0; _b < (size_t)count; ++_b) {(ptr)[_b].~T();} ::cc::CategorisedAllocPolicy::DeallocateBytesAligned(ptr);} /// Allocate space for one primitive type, external type or non-virtual type aligned to SIMD boundaries # define _CC_NEW_T_SIMD(T) _CC_NEW_T_ALIGN(T, CC_SIMD_ALIGNMENT) /// Allocate a block of memory for 'count' primitive types aligned to SIMD boundaries - do not use for classes that inherit from AllocatedObject @@ -120,30 +120,30 @@ NS_CC_END #else /// Allocate a block of raw memory. -# define _CC_MALLOC(bytes) ::cocos2d::CategorisedAllocPolicy::AllocateBytes(bytes) +# define _CC_MALLOC(bytes) ::cc::CategorisedAllocPolicy::AllocateBytes(bytes) /// Reallocate a block of raw memory. -# define _CC_REALLOC(ptr, bytes) ::cocos2d::CategorisedAllocPolicy::ReallocateBytes(ptr, bytes) +# define _CC_REALLOC(ptr, bytes) ::cc::CategorisedAllocPolicy::ReallocateBytes(ptr, bytes) /// Allocate a block of memory for a primitive type. -# define _CC_ALLOC_T(T, count) static_cast(::cocos2d::CategorisedAllocPolicy::AllocateBytes(sizeof(T)*(count))) +# define _CC_ALLOC_T(T, count) static_cast(::cc::CategorisedAllocPolicy::AllocateBytes(sizeof(T)*(count))) /// Free the memory allocated with _CC_MALLOC or _CC_ALLOC_T. Category is required to be restated to ensure the matching policy is used -# define _CC_FREE(ptr) ::cocos2d::CategorisedAllocPolicy::DeallocateBytes((void*)ptr) +# define _CC_FREE(ptr) ::cc::CategorisedAllocPolicy::DeallocateBytes((void*)ptr) /// Allocate space for one primitive type, external type or non-virtual type with constructor parameters -# define _CC_NEW_T(T) new (::cocos2d::CategorisedAllocPolicy::AllocateBytes(sizeof(T))) T +# define _CC_NEW_T(T) new (::cc::CategorisedAllocPolicy::AllocateBytes(sizeof(T))) T /// Allocate a block of memory for 'count' primitive types - do not use for classes that inherit from AllocatedObject -# define _CC_NEW_ARRAY_T(T, count) ::cocos2d::ConstructN(static_cast(::cocos2d::CategorisedAllocPolicy::AllocateBytes(sizeof(T)*(count))), count) +# define _CC_NEW_ARRAY_T(T, count) ::cc::ConstructN(static_cast(::cc::CategorisedAllocPolicy::AllocateBytes(sizeof(T)*(count))), count) /// Free the memory allocated with _CC_NEW_T. -# define _CC_DELETE_T(ptr, T) if(ptr){(ptr)->~T(); ::cocos2d::CategorisedAllocPolicy::DeallocateBytes((void*)ptr);} +# define _CC_DELETE_T(ptr, T) if(ptr){(ptr)->~T(); ::cc::CategorisedAllocPolicy::DeallocateBytes((void*)ptr);} /// Free the memory allocated with _CC_NEW_ARRAY_T. -# define _CC_DELETE_ARRAY_T(ptr, T, count) if(ptr){for (size_t b = 0; b < (size_t)count; ++b) {(ptr)[b].~T();} ::cocos2d::CategorisedAllocPolicy::DeallocateBytes((void*)ptr);} +# define _CC_DELETE_ARRAY_T(ptr, T, count) if(ptr){for (size_t b = 0; b < (size_t)count; ++b) {(ptr)[b].~T();} ::cc::CategorisedAllocPolicy::DeallocateBytes((void*)ptr);} // aligned allocation /// Allocate a block of raw memory aligned to user defined boundaries. -# define _CC_MALLOC_ALIGN(bytes, align) ::cocos2d::CategorisedAllocPolicy::AllocateBytesAligned(align, bytes) +# define _CC_MALLOC_ALIGN(bytes, align) ::cc::CategorisedAllocPolicy::AllocateBytesAligned(align, bytes) /// Allocate a block of memory for a primitive type aligned to user defined boundaries. -# define _CC_ALLOC_T_ALIGN(T, count, align) static_cast(::cocos2d::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T)*(count))) +# define _CC_ALLOC_T_ALIGN(T, count, align) static_cast(::cc::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T)*(count))) /// Free the memory allocated with either _CC_MALLOC_ALIGN or _CC_ALLOC_T_ALIGN. -# define _CC_FREE_ALIGN(ptr, align) ::cocos2d::CategorisedAllocPolicy::DeallocateBytesAligned((void*)ptr) +# define _CC_FREE_ALIGN(ptr, align) ::cc::CategorisedAllocPolicy::DeallocateBytesAligned((void*)ptr) /// Allocate a block of raw memory aligned to SIMD boundaries. # define _CC_MALLOC_SIMD(bytes) _CC_MALLOC_ALIGN(bytes, CC_SIMD_ALIGNMENT) /// Allocate a block of memory for a primitive type aligned to SIMD boundaries. @@ -152,13 +152,13 @@ NS_CC_END # define _CC_FREE_SIMD(ptr) _CC_FREE_ALIGN(ptr, CC_SIMD_ALIGNMENT) /// Allocate space for one primitive type, external type or non-virtual type aligned to user defined boundaries -# define _CC_NEW_T_ALIGN(T, align) new (::cocos2d::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T))) T +# define _CC_NEW_T_ALIGN(T, align) new (::cc::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T))) T /// Allocate a block of memory for 'count' primitive types aligned to user defined boundaries - do not use for classes that inherit from AllocatedObject -# define _CC_NEW_ARRAY_T_ALIGN(T, count, align) ::cocos2d::ConstructN(static_cast(::cocos2d::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T)*(count))), count) +# define _CC_NEW_ARRAY_T_ALIGN(T, count, align) ::cc::ConstructN(static_cast(::cc::CategorisedAllocPolicy::AllocateBytesAligned(align, sizeof(T)*(count))), count) /// Free the memory allocated with _CC_NEW_T_ALIGN. -# define _CC_DELETE_T_ALIGN(ptr, T, align) if(ptr){(ptr)->~T(); ::cocos2d::CategorisedAllocPolicy::DeallocateBytesAligned((void*)ptr);} +# define _CC_DELETE_T_ALIGN(ptr, T, align) if(ptr){(ptr)->~T(); ::cc::CategorisedAllocPolicy::DeallocateBytesAligned((void*)ptr);} /// Free the memory allocated with _CC_NEW_ARRAY_T_ALIGN. -# define _CC_DELETE_ARRAY_T_ALIGN(ptr, T, count, align) if(ptr){for (size_t _b = 0; _b < (size_t)count; ++_b) { (ptr)[_b].~T();} ::cocos2d::CategorisedAllocPolicy::DeallocateBytesAligned((void*)ptr);} +# define _CC_DELETE_ARRAY_T_ALIGN(ptr, T, count, align) if(ptr){for (size_t _b = 0; _b < (size_t)count; ++_b) { (ptr)[_b].~T();} ::cc::CategorisedAllocPolicy::DeallocateBytesAligned((void*)ptr);} /// Allocate space for one primitive type, external type or non-virtual type aligned to SIMD boundaries # define _CC_NEW_T_SIMD(T) _CC_NEW_T_ALIGN(T, CC_SIMD_ALIGNMENT) /// Allocate a block of memory for 'count' primitive types aligned to SIMD boundaries - do not use for classes that inherit from AllocatedObject diff --git a/native/cocos/renderer/core/memory/MemTracker.cc b/native/cocos/renderer/core/memory/MemTracker.cc index 37e9f5f90f..3eb3dbc633 100755 --- a/native/cocos/renderer/core/memory/MemTracker.cc +++ b/native/cocos/renderer/core/memory/MemTracker.cc @@ -30,7 +30,7 @@ extern "C" #define LEAK_FILENAME "MemoryLeaks.log" -NS_CC_BEGIN +namespace cc { struct AllocHashNode { tommy_hashdyn_node node; @@ -264,5 +264,5 @@ void MemTracker::DumpMemoryAllocation() { #endif } -NS_CC_END +} #endif diff --git a/native/cocos/renderer/core/memory/MemTracker.h b/native/cocos/renderer/core/memory/MemTracker.h index cafd6017ca..8f8fbcda55 100755 --- a/native/cocos/renderer/core/memory/MemTracker.h +++ b/native/cocos/renderer/core/memory/MemTracker.h @@ -3,7 +3,7 @@ #ifdef CC_MEMORY_TRACKER -NS_CC_BEGIN +namespace cc { /** This class tracks the allocations and deallocations made, and is able to report memory statistics and leaks. @@ -57,7 +57,7 @@ class CC_CORE_API MemTracker { void* allocations_; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/core/memory/Memory.cc b/native/cocos/renderer/core/memory/Memory.cc index b722503950..07accfa833 100755 --- a/native/cocos/renderer/core/memory/Memory.cc +++ b/native/cocos/renderer/core/memory/Memory.cc @@ -2,9 +2,9 @@ #include "Memory.h" #include "StlAlloc.h" -NS_CC_BEGIN +namespace cc { CC_CORE_API SA stl_char_allocator; -NS_CC_END +} #if 0 CC_CORE_API void* BareNewErroneouslyCalled(size_t sz) { diff --git a/native/cocos/renderer/core/memory/Memory.h b/native/cocos/renderer/core/memory/Memory.h index 1a27ecbb8c..62f844cd43 100755 --- a/native/cocos/renderer/core/memory/Memory.h +++ b/native/cocos/renderer/core/memory/Memory.h @@ -7,52 +7,106 @@ // Global Interface Definitions - // Undefine these macros that are defined in cocos2d-x lite. // Should unify them in future. #undef CC_SAFE_DELETE #undef CC_SAFE_DELETE_ARRAY #undef CC_SAFE_FREE -#define CC_NEW(T) _CC_NEW T -#define CC_NEW_ARRAY(T, count) _CC_NEW T[count] -#define CC_DELETE(ptr) _CC_DELETE (ptr) -#define CC_DELETE_ARRAY(ptr) _CC_DELETE[] (ptr) -#define CC_SAFE_DELETE(ptr) if(ptr) { CC_DELETE(ptr); (ptr) = nullptr; } -#define CC_SAFE_DELETE_ARRAY(ptr) if(ptr) { CC_DELETE_ARRAY(ptr); (ptr) = nullptr; } -#define CC_UNSAFE_DELETE(ptr) if(ptr) { CC_DELETE(ptr); } -#define CC_UNSAFE_DELETE_ARRAY(ptr) if(ptr) { CC_DELETE_ARRAY(ptr); } +#define CC_NEW(T) _CC_NEW T +#define CC_NEW_ARRAY(T, count) _CC_NEW T[count] +#define CC_DELETE(ptr) _CC_DELETE(ptr) +#define CC_DELETE_ARRAY(ptr) _CC_DELETE[](ptr) +#define CC_SAFE_DELETE(ptr) \ + if (ptr) { \ + CC_DELETE(ptr); \ + (ptr) = nullptr; \ + } +#define CC_SAFE_DELETE_ARRAY(ptr) \ + if (ptr) { \ + CC_DELETE_ARRAY(ptr); \ + (ptr) = nullptr; \ + } +#define CC_UNSAFE_DELETE(ptr) \ + if (ptr) { \ + CC_DELETE(ptr); \ + } +#define CC_UNSAFE_DELETE_ARRAY(ptr) \ + if (ptr) { \ + CC_DELETE_ARRAY(ptr); \ + } -#define CC_NEW_T(T) _CC_NEW_T(T) -#define CC_NEW_ARRAY_T(T, count) _CC_NEW_ARRAY_T(T, count) -#define CC_DELETE_T(ptr, T) _CC_DELETE_T(ptr, T) -#define CC_DELETE_ARRAY_T(ptr, T, count) _CC_DELETE_ARRAY_T(ptr, T, count) -#define CC_SAFE_DELETE_T(ptr, T) if(ptr) { CC_DELETE_T(ptr, T); (ptr) = nullptr; } -#define CC_SAFE_DELETE_ARRAY_T(ptr, T, count) if(ptr) { CC_DELETE_ARRAY_T(ptr, T, count); (ptr) = nullptr; } -#define CC_UNSAFE_DELETE_T(ptr, T) if(ptr) { CC_DELETE_T(ptr, T); } -#define CC_UNSAFE_DELETE_ARRAY_T(ptr, T, count) if(ptr) { CC_DELETE_ARRAY_T(ptr, T, count); } +#define CC_NEW_T(T) _CC_NEW_T(T) +#define CC_NEW_ARRAY_T(T, count) _CC_NEW_ARRAY_T(T, count) +#define CC_DELETE_T(ptr, T) _CC_DELETE_T(ptr, T) +#define CC_DELETE_ARRAY_T(ptr, T, count) _CC_DELETE_ARRAY_T(ptr, T, count) +#define CC_SAFE_DELETE_T(ptr, T) \ + if (ptr) { \ + CC_DELETE_T(ptr, T); \ + (ptr) = nullptr; \ + } +#define CC_SAFE_DELETE_ARRAY_T(ptr, T, count) \ + if (ptr) { \ + CC_DELETE_ARRAY_T(ptr, T, count); \ + (ptr) = nullptr; \ + } +#define CC_UNSAFE_DELETE_T(ptr, T) \ + if (ptr) { \ + CC_DELETE_T(ptr, T); \ + } +#define CC_UNSAFE_DELETE_ARRAY_T(ptr, T, count) \ + if (ptr) { \ + CC_DELETE_ARRAY_T(ptr, T, count); \ + } -#define CC_MALLOC(bytes) _CC_MALLOC(bytes) -#define CC_REALLOC(ptr, bytes) _CC_REALLOC(ptr, bytes) -#define CC_ALLOC(T, count) _CC_ALLOC_T(T, count) -#define CC_FREE(ptr) _CC_FREE(ptr) -#define CC_SAFE_FREE(ptr) if(ptr) { CC_FREE(ptr); (ptr) = nullptr; } -#define CC_UNSAFE_FREE(ptr) if(ptr) { CC_FREE(ptr); } +#define CC_MALLOC(bytes) _CC_MALLOC(bytes) +#define CC_REALLOC(ptr, bytes) _CC_REALLOC(ptr, bytes) +#define CC_ALLOC(T, count) _CC_ALLOC_T(T, count) +#define CC_FREE(ptr) _CC_FREE(ptr) +#define CC_SAFE_FREE(ptr) \ + if (ptr) { \ + CC_FREE(ptr); \ + (ptr) = nullptr; \ + } +#define CC_UNSAFE_FREE(ptr) \ + if (ptr) { \ + CC_FREE(ptr); \ + } -#define CC_MALLOC_SIMD(bytes) _CC_MALLOC_SIMD(bytes) -#define CC_FREE_SIMD(ptr) _CC_FREE_SIMD(ptr) +#define CC_MALLOC_SIMD(bytes) _CC_MALLOC_SIMD(bytes) +#define CC_FREE_SIMD(ptr) _CC_FREE_SIMD(ptr) -#define CC_DESTROY(ptr) { (ptr)->destroy(); CC_DELETE(ptr); } -#define CC_SAFE_DESTROY(ptr) if (ptr) { (ptr)->destroy(); CC_DELETE(ptr); ptr = nullptr; } -#define CC_UNSAFE_DESTROY(ptr) if (ptr) { (ptr)->destroy(); CC_DELETE(ptr); } +#define CC_DESTROY(ptr) \ + { \ + (ptr)->destroy(); \ + CC_DELETE(ptr); \ + } +#define CC_SAFE_DESTROY(ptr) \ + if (ptr) { \ + (ptr)->destroy(); \ + CC_DELETE(ptr); \ + ptr = nullptr; \ + } +#define CC_UNSAFE_DESTROY(ptr) \ + if (ptr) { \ + (ptr)->destroy(); \ + CC_DELETE(ptr); \ + } -#define CC_SAFE_RELEASE_REF(ptr) if (ptr) { (ptr)->ReleaseRef(); ptr = nullptr; } -#define CC_UNSAFE_RELEASE_REF(ptr) if (ptr) { (ptr)->ReleaseRef(); } +#define CC_SAFE_RELEASE_REF(ptr) \ + if (ptr) { \ + (ptr)->ReleaseRef(); \ + ptr = nullptr; \ + } +#define CC_UNSAFE_RELEASE_REF(ptr) \ + if (ptr) { \ + (ptr)->ReleaseRef(); \ + } #if 0 -#if (CC_PLATFORM == CC_PLATFORM_WINDOWS) && (CC_MODE == CC_MODE_DEBUG) + #if (CC_PLATFORM == CC_PLATFORM_WINDOWS) && (CC_MODE == CC_MODE_DEBUG) CC_CORE_API void* BareNewErroneouslyCalled(size_t sz); CC_INLINE void* operator new(size_t sz) { return BareNewErroneouslyCalled(sz); } CC_INLINE void operator delete(void* ptr) throw() { free(ptr); } -#endif + #endif #endif diff --git a/native/cocos/renderer/core/memory/NedPooling.cc b/native/cocos/renderer/core/memory/NedPooling.cc index d46fb3d069..2bb6a520b6 100755 --- a/native/cocos/renderer/core/memory/NedPooling.cc +++ b/native/cocos/renderer/core/memory/NedPooling.cc @@ -13,7 +13,7 @@ #define INSECURE 1 #include -NS_CC_BEGIN +namespace cc { namespace nedPoolingIntern { @@ -198,6 +198,6 @@ void NedPoolingImpl::DeallocBytes(void* ptr) { nedPoolingIntern::InternalFree(ptr); } -NS_CC_END +} #endif // end - #ifdef CC_MEMORY_ALLOCATOR_NEDPOOLING diff --git a/native/cocos/renderer/core/memory/NedPooling.h b/native/cocos/renderer/core/memory/NedPooling.h index f377f75368..3147ea77c2 100755 --- a/native/cocos/renderer/core/memory/NedPooling.h +++ b/native/cocos/renderer/core/memory/NedPooling.h @@ -3,7 +3,7 @@ #if (CC_MEMORY_ALLOCATOR == CC_MEMORY_ALLOCATOR_NEDPOOLING) -NS_CC_BEGIN +namespace cc { //Non-templated utility class just to hide nedmalloc. class CC_CORE_API NedPoolingImpl @@ -50,7 +50,7 @@ private: NedPoolingAllocPolicy() {} }; -NS_CC_END +} #endif // end - #ifdef CC_MEMORY_ALLOCATOR_NEDPOOLING diff --git a/native/cocos/renderer/core/memory/StdAlloc.h b/native/cocos/renderer/core/memory/StdAlloc.h index 8638a9e4e5..137d23ba9f 100755 --- a/native/cocos/renderer/core/memory/StdAlloc.h +++ b/native/cocos/renderer/core/memory/StdAlloc.h @@ -3,7 +3,7 @@ #if (CC_MEMORY_ALLOCATOR == CC_MEMORY_ALLOCATOR_STD) -NS_CC_BEGIN +namespace cc { /** A "standard" allocation policy for use with AllocatedObject and STLAllocator. This is the class that actually does the allocation @@ -135,7 +135,7 @@ class CC_CORE_API StdAllocPolicy { StdAllocPolicy() {} }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/core/memory/StlAlloc.h b/native/cocos/renderer/core/memory/StlAlloc.h index 38dce7fab9..c8173a5d68 100755 --- a/native/cocos/renderer/core/memory/StlAlloc.h +++ b/native/cocos/renderer/core/memory/StlAlloc.h @@ -5,7 +5,7 @@ #include #include -NS_CC_BEGIN +namespace cc { // Base STL allocator class. template @@ -342,6 +342,6 @@ typedef std::wstring WString; typedef vector::type StringArray; -NS_CC_END +} #endif // CC_CORE_STL_ALLOC_H_ diff --git a/native/cocos/renderer/core/util/StringUtil.cc b/native/cocos/renderer/core/util/StringUtil.cc index 95e7c7e34f..fc2930f023 100755 --- a/native/cocos/renderer/core/util/StringUtil.cc +++ b/native/cocos/renderer/core/util/StringUtil.cc @@ -8,7 +8,7 @@ # include #endif -NS_CC_BEGIN +namespace cc { #if defined(_WIN32) int StringUtil::VPrintf(char* buf, char* last, const char* fmt, va_list args) { @@ -93,4 +93,4 @@ StringArray StringUtil::Split(const String &str, const String &delims, uint max_ return strs; } -NS_CC_END +} diff --git a/native/cocos/renderer/core/util/StringUtil.h b/native/cocos/renderer/core/util/StringUtil.h index a49c9bb89e..76a0495c7d 100755 --- a/native/cocos/renderer/core/util/StringUtil.h +++ b/native/cocos/renderer/core/util/StringUtil.h @@ -1,7 +1,7 @@ #ifndef CC_CORE_KERNEL_UTIL_STRING_UTIL_H_ #define CC_CORE_KERNEL_UTIL_STRING_UTIL_H_ -NS_CC_BEGIN +namespace cc { class CC_CORE_API StringUtil { public: @@ -11,6 +11,6 @@ class CC_CORE_API StringUtil { static StringArray Split(const String &str, const String &delims, uint max_splits = 0); }; -NS_CC_END +} #endif // CC_CORE_KERNEL_UTIL_STRING_UTIL_H_ diff --git a/native/cocos/renderer/gfx-gles2/GLES2BindingLayout.cc b/native/cocos/renderer/gfx-gles2/GLES2BindingLayout.cc index 9011bd020b..9ca1c43633 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2BindingLayout.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2BindingLayout.cc @@ -5,7 +5,7 @@ #include "GLES2Sampler.h" #include "GLES2Texture.h" -NS_CC_BEGIN +namespace cc { GLES2BindingLayout::GLES2BindingLayout(GFXDevice *device) : GFXBindingLayout(device) { @@ -78,4 +78,4 @@ void GLES2BindingLayout::update() { } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2BindingLayout.h b/native/cocos/renderer/gfx-gles2/GLES2BindingLayout.h index 8fcddd51a2..cc4a5a26a4 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2BindingLayout.h +++ b/native/cocos/renderer/gfx-gles2/GLES2BindingLayout.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_BINDING_LAYOUT_H_ #define CC_GFXGLES2_GLES2_BINDING_LAYOUT_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUBindingLayout; @@ -21,6 +21,6 @@ private: GLES2GPUBindingLayout *_gpuBindingLayout = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Buffer.cc b/native/cocos/renderer/gfx-gles2/GLES2Buffer.cc index 08664bb329..461fdaaa17 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Buffer.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Buffer.cc @@ -2,7 +2,7 @@ #include "GLES2Buffer.h" #include "GLES2Commands.h" -NS_CC_BEGIN +namespace cc { GLES2Buffer::GLES2Buffer(GFXDevice *device) : GFXBuffer(device) { @@ -113,4 +113,4 @@ void GLES2Buffer::update(void *buffer, uint offset, uint size) { GLES2CmdFuncUpdateBuffer((GLES2Device *)_device, _gpuBuffer, buffer, offset, size); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Buffer.h b/native/cocos/renderer/gfx-gles2/GLES2Buffer.h index 6d8bf7f625..ae06987814 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Buffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Buffer.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_BUFFER_H_ #define CC_GFXGLES2_GLES2_BUFFER_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUBuffer; @@ -22,6 +22,6 @@ private: GLES2GPUBuffer *_gpuBuffer = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandAllocator.cc b/native/cocos/renderer/gfx-gles2/GLES2CommandAllocator.cc index 0738f550a9..5b91087d84 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandAllocator.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandAllocator.cc @@ -1,7 +1,7 @@ #include "GLES2Std.h" #include "GLES2CommandAllocator.h" -NS_CC_BEGIN +namespace cc { GLES2CommandAllocator::GLES2CommandAllocator(GFXDevice *device) : GFXCommandAllocator(device) { @@ -39,4 +39,4 @@ void GLES2CommandAllocator::clearCmds(GLES2CmdPackage *cmd_package) { cmd_package->cmds.clear(); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandAllocator.h b/native/cocos/renderer/gfx-gles2/GLES2CommandAllocator.h index 3405e2ccd5..078e0d1874 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandAllocator.h +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandAllocator.h @@ -4,7 +4,7 @@ #include "gfx/GFXCommandPool.h" #include "GLES2Commands.h" -NS_CC_BEGIN +namespace cc { class CC_GLES2_API GLES2CommandAllocator : public GFXCommandAllocator { public: @@ -32,6 +32,6 @@ public: } }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cc b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cc index 15b6660b33..1108b3ebad 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cc @@ -8,7 +8,7 @@ #include "GLES2Buffer.h" #include "GLES2Texture.h" -NS_CC_BEGIN +namespace cc { GLES2CommandBuffer::GLES2CommandBuffer(GFXDevice *device) : GFXCommandBuffer(device) { @@ -320,4 +320,4 @@ void GLES2CommandBuffer::BindStates() { _isStateInvalid = false; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h index c272c4c0db..d2c50a4dea 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h @@ -3,7 +3,7 @@ #include "GLES2Commands.h" -NS_CC_BEGIN +namespace cc { class GLES2CommandAllocator; @@ -59,6 +59,6 @@ private: bool _isStateInvalid = false; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Commands.cc b/native/cocos/renderer/gfx-gles2/GLES2Commands.cc index e005326751..b3c4ecfebc 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Commands.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Commands.cc @@ -6,7 +6,7 @@ #define BUFFER_OFFSET(idx) (static_cast(0) + (idx)) -NS_CC_BEGIN +namespace cc { namespace { GLenum MapGLInternalFormat(GFXFormat format) { @@ -2250,4 +2250,4 @@ void GLES2CmdFuncCopyBuffersToTexture(GLES2Device *device, uint8_t *const *buffe } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Commands.h b/native/cocos/renderer/gfx-gles2/GLES2Commands.h index 4af9b80adc..422be537b0 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Commands.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Commands.h @@ -3,7 +3,7 @@ #include "GLES2GPUObjects.h" -NS_CC_BEGIN +namespace cc { class GLES2Device; @@ -168,6 +168,6 @@ CC_GLES2_API void GLES2CmdFuncDestroyFramebuffer(GLES2Device *device, GLES2GPUFr CC_GLES2_API void GLES2CmdFuncExecuteCmds(GLES2Device *device, GLES2CmdPackage *cmd_package); CC_GLES2_API void GLES2CmdFuncCopyBuffersToTexture(GLES2Device *device, uint8_t *const *buffers, GLES2GPUTexture *gpuTexture, const GFXBufferTextureCopyList ®ions); -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Context.cc b/native/cocos/renderer/gfx-gles2/GLES2Context.cc index f1d685303c..e5bf42bb0e 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Context.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Context.cc @@ -11,7 +11,7 @@ // #define CC_GFX_DEBUG -NS_CC_BEGIN +namespace cc { #if (CC_PLATFORM == CC_PLATFORM_WINDOWS) @@ -446,4 +446,4 @@ bool GLES2Context::CheckExtension(const String &extension) const { return (std::find(_extensions.begin(), _extensions.end(), extension) != _extensions.end()); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Context.h b/native/cocos/renderer/gfx-gles2/GLES2Context.h index 76622ce318..1d351fb4d6 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Context.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Context.h @@ -28,7 +28,7 @@ #define EGL_OPENGL_ES3_BIT_KHR 0x00000040 #endif -NS_CC_BEGIN +namespace cc { class CC_GLES2_API GLES2Context : public GFXContext { public: @@ -89,6 +89,6 @@ private: bool _isInitialized = false; }; -NS_CC_END +} #endif // CC_GFXGLES2_GLES2_EGL_CONTEXT_H_ diff --git a/native/cocos/renderer/gfx-gles2/GLES2Context.mm b/native/cocos/renderer/gfx-gles2/GLES2Context.mm index ce5513f771..d8f02ab308 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Context.mm +++ b/native/cocos/renderer/gfx-gles2/GLES2Context.mm @@ -5,7 +5,7 @@ #import #import -NS_CC_BEGIN +namespace cc { #if (CC_PLATFORM == CC_PLATFORM_MAC_IOS) @@ -185,4 +185,4 @@ bool GLES2Context::MakeCurrentImpl() { #endif -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Device.cc b/native/cocos/renderer/gfx-gles2/GLES2Device.cc index 416aeed767..929e9fb38b 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Device.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Device.cc @@ -18,7 +18,7 @@ #include "GLES2StateCache.h" #include "GLES2Texture.h" -NS_CC_BEGIN +namespace cc { GLES2Device::GLES2Device() { } @@ -304,4 +304,4 @@ void GLES2Device::copyBuffersToTexture(const GFXDataArray &buffers, GFXTexture * GLES2CmdFuncCopyBuffersToTexture(this, buffers.datas.data(), ((GLES2Texture *)dst)->gpuTexture(), regions); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Device.h b/native/cocos/renderer/gfx-gles2/GLES2Device.h index f63490bcf9..68a4932658 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Device.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Device.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_DEVICE_H_ #define CC_GFXGLES2_GLES2_DEVICE_H_ -NS_CC_BEGIN +namespace cc { class GLES2StateCache; @@ -57,6 +57,6 @@ private: bool _useDiscardFramebuffer = false; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Fence.cc b/native/cocos/renderer/gfx-gles2/GLES2Fence.cc index b8bdd18e93..d83172e1d9 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Fence.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Fence.cc @@ -3,7 +3,7 @@ #include "GLES2Device.h" #include "GLES2GPUObjects.h" -NS_CC_BEGIN +namespace cc { GLES2Fence::GLES2Fence(GFXDevice *device) : GFXFence(device) { @@ -43,4 +43,4 @@ void GLES2Fence::reset() { // TODO } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Fence.h b/native/cocos/renderer/gfx-gles2/GLES2Fence.h index 9f360ce8e7..65a06b0aa9 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Fence.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Fence.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_FENCE_H_ #define CC_GFXGLES2_GLES2_FENCE_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUFence; @@ -20,6 +20,6 @@ private: GLES2GPUFence *_gpuFence = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.cc b/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.cc index 4022844a1c..b9df516b6d 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.cc @@ -5,7 +5,7 @@ #include "GLES2Context.h" #include "GLES2Texture.h" -NS_CC_BEGIN +namespace cc { GLES2Framebuffer::GLES2Framebuffer(GFXDevice *device) : GFXFramebuffer(device) { @@ -71,4 +71,4 @@ void GLES2Framebuffer::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.h b/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.h index 9a32d5f7ae..b0c3a2eda0 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Framebuffer.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_FRAMEBUFFER_H_ #define CC_GFXGLES2_GLES2_FRAMEBUFFER_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUFramebuffer; @@ -20,6 +20,6 @@ private: GLES2GPUFramebuffer *_gpuFBO = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h b/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h index 8e86b52127..bfc940fabc 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h +++ b/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h @@ -3,7 +3,7 @@ #include "gles2w.h" -NS_CC_BEGIN +namespace cc { class GLES2GPUBuffer : public Object { public: @@ -237,6 +237,6 @@ class GLES2GPUFence : public Object { public: }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.cc b/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.cc index fd00dbf5ca..b8933c5d30 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.cc @@ -3,7 +3,7 @@ #include "GLES2Commands.h" #include "GLES2Buffer.h" -NS_CC_BEGIN +namespace cc { GLES2InputAssembler::GLES2InputAssembler(GFXDevice *device) : GFXInputAssembler(device) { @@ -64,4 +64,4 @@ void GLES2InputAssembler::ExtractCmdDraw(GLES2CmdDraw *cmd) { cmd->draw_info.firstInstance = _firstInstance; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.h b/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.h index 9e9b1ecb40..b7d85c5c7c 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.h +++ b/native/cocos/renderer/gfx-gles2/GLES2InputAssembler.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_INPUT_ASSEMBLER_H_ #define CC_GFXGLES2_GLES2_INPUT_ASSEMBLER_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUInputAssembler; class GLES2CmdDraw; @@ -23,6 +23,6 @@ private: GLES2GPUInputAssembler *_gpuInputAssembler = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.cc b/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.cc index 4ddff5b8e0..6b3c5d7e7b 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.cc @@ -2,7 +2,7 @@ #include "GLES2PipelineLayout.h" #include "GLES2Commands.h" -NS_CC_BEGIN +namespace cc { GLES2PipelineLayout::GLES2PipelineLayout(GFXDevice *device) : GFXPipelineLayout(device) { @@ -30,4 +30,4 @@ void GLES2PipelineLayout::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.h b/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.h index ad53816036..8a217163f6 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.h +++ b/native/cocos/renderer/gfx-gles2/GLES2PipelineLayout.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_PIPELINE_LAYOUT_H_ #define CC_GFXGLES2_GLES2_PIPELINE_LAYOUT_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUPipelineLayout; @@ -20,6 +20,6 @@ private: GLES2GPUPipelineLayout *_gpuPipelineLayout = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2PipelineState.cc b/native/cocos/renderer/gfx-gles2/GLES2PipelineState.cc index c60d88da8e..8ffaf8f865 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PipelineState.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2PipelineState.cc @@ -5,7 +5,7 @@ #include "GLES2RenderPass.h" #include "GLES2PipelineLayout.h" -NS_CC_BEGIN +namespace cc { const GLenum GLES2Primitives[] = { GL_POINTS, @@ -67,4 +67,4 @@ void GLES2PipelineState::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2PipelineState.h b/native/cocos/renderer/gfx-gles2/GLES2PipelineState.h index 058d3256d2..9f4eccb64b 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PipelineState.h +++ b/native/cocos/renderer/gfx-gles2/GLES2PipelineState.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_PIPELINE_STATE_H_ #define CC_GFXGLES2_GLES2_PIPELINE_STATE_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUPipelineState; @@ -20,6 +20,6 @@ private: GLES2GPUPipelineState *_gpuPipelineState = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Queue.cc b/native/cocos/renderer/gfx-gles2/GLES2Queue.cc index 4335d702e1..fe4ade20f0 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Queue.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Queue.cc @@ -3,7 +3,7 @@ #include "GLES2Commands.h" #include "GLES2CommandBuffer.h" -NS_CC_BEGIN +namespace cc { GLES2Queue::GLES2Queue(GFXDevice *device) : GFXQueue(device) { @@ -36,4 +36,4 @@ void GLES2Queue::submit(const vector::type &cmdBuffs, GFXFen } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Queue.h b/native/cocos/renderer/gfx-gles2/GLES2Queue.h index 51b0773b3f..6f1a0cea3a 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Queue.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Queue.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_QUEUE_H_ #define CC_GFXGLES2_GLES2_QUEUE_H_ -NS_CC_BEGIN +namespace cc { class CC_GLES2_API GLES2Queue : public GFXQueue { public: @@ -24,6 +24,6 @@ private: uint _numTriangles = 0; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2RenderPass.cc b/native/cocos/renderer/gfx-gles2/GLES2RenderPass.cc index 1751298ea3..e9ab80ad81 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2RenderPass.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2RenderPass.cc @@ -2,7 +2,7 @@ #include "GLES2RenderPass.h" #include "GLES2Commands.h" -NS_CC_BEGIN +namespace cc { GLES2RenderPass::GLES2RenderPass(GFXDevice *device) : GFXRenderPass(device) { @@ -35,4 +35,4 @@ void GLES2RenderPass::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2RenderPass.h b/native/cocos/renderer/gfx-gles2/GLES2RenderPass.h index 177ea95096..aefa94613f 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2RenderPass.h +++ b/native/cocos/renderer/gfx-gles2/GLES2RenderPass.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_RENDER_PASS_H_ #define CC_GFXGLES2_GLES2_RENDER_PASS_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPURenderPass; @@ -20,6 +20,6 @@ private: GLES2GPURenderPass *_gpuRenderPass = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Sampler.cc b/native/cocos/renderer/gfx-gles2/GLES2Sampler.cc index b39fd868e0..92274c701c 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Sampler.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Sampler.cc @@ -2,7 +2,7 @@ #include "GLES2Sampler.h" #include "GLES2Commands.h" -NS_CC_BEGIN +namespace cc { GLES2Sampler::GLES2Sampler(GFXDevice *device) : GFXSampler(device) { @@ -52,4 +52,4 @@ void GLES2Sampler::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Sampler.h b/native/cocos/renderer/gfx-gles2/GLES2Sampler.h index 79bd5a5b9e..c9daba412e 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Sampler.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Sampler.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_SAMPLER_H_ #define CC_GFXGLES2_GLES2_SAMPLER_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUSampler; @@ -33,6 +33,6 @@ private: float _mipLODBias = 0.0f; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Shader.cc b/native/cocos/renderer/gfx-gles2/GLES2Shader.cc index 6dcd89b8eb..c7eb6b00d1 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Shader.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Shader.cc @@ -2,7 +2,7 @@ #include "GLES2Shader.h" #include "GLES2Commands.h" -NS_CC_BEGIN +namespace cc { GLES2Shader::GLES2Shader(GFXDevice *device) : GFXShader(device) { @@ -43,4 +43,4 @@ void GLES2Shader::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Shader.h b/native/cocos/renderer/gfx-gles2/GLES2Shader.h index 86a68744c1..2ee92be11e 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Shader.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Shader.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_SHADER_H_ #define CC_GFXGLES2_GLES2_SHADER_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUShader; @@ -20,6 +20,6 @@ private: GLES2GPUShader *_gpuShader = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2StateCache.h b/native/cocos/renderer/gfx-gles2/GLES2StateCache.h index c899ec17c2..506d1d917a 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2StateCache.h +++ b/native/cocos/renderer/gfx-gles2/GLES2StateCache.h @@ -3,7 +3,7 @@ #include "gles2w.h" -NS_CC_BEGIN +namespace cc { class GLES2StateCache : public Object { public: @@ -31,6 +31,6 @@ public: GLES2StateCache() {} }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles2/GLES2Texture.cc b/native/cocos/renderer/gfx-gles2/GLES2Texture.cc index b0c31444bf..43f7106061 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Texture.cc +++ b/native/cocos/renderer/gfx-gles2/GLES2Texture.cc @@ -2,7 +2,7 @@ #include "GLES2Texture.h" #include "GLES2Commands.h" -NS_CC_BEGIN +namespace cc { GLES2Texture::GLES2Texture(GFXDevice *device) : GFXTexture(device) { @@ -117,4 +117,4 @@ void GLES2Texture::resize(uint width, uint height) { } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Texture.h b/native/cocos/renderer/gfx-gles2/GLES2Texture.h index 6ed5652b11..091570023d 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Texture.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Texture.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES2_GLES2_TEXTURE_H_ #define CC_GFXGLES2_GLES2_TEXTURE_H_ -NS_CC_BEGIN +namespace cc { class GLES2GPUTexture; @@ -22,6 +22,6 @@ private: GLES2GPUTexture *_gpuTexture = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3BindingLayout.cc b/native/cocos/renderer/gfx-gles3/GLES3BindingLayout.cc index 33ae7f768a..42b8755594 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3BindingLayout.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3BindingLayout.cc @@ -5,7 +5,7 @@ #include "GLES3Sampler.h" #include "GLES3Texture.h" -NS_CC_BEGIN +namespace cc { GLES3BindingLayout::GLES3BindingLayout(GFXDevice *device) : GFXBindingLayout(device) { @@ -79,4 +79,4 @@ void GLES3BindingLayout::update() { } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3BindingLayout.h b/native/cocos/renderer/gfx-gles3/GLES3BindingLayout.h index b1ca1fa614..3af22004da 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3BindingLayout.h +++ b/native/cocos/renderer/gfx-gles3/GLES3BindingLayout.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_BINDING_LAYOUT_H_ #define CC_GFXGLES3_GLES3_BINDING_LAYOUT_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUBindingLayout; @@ -21,6 +21,6 @@ private: GLES3GPUBindingLayout *_gpuBindingLayout = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Buffer.cc b/native/cocos/renderer/gfx-gles3/GLES3Buffer.cc index 55da3caf0c..087cc11ab7 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Buffer.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Buffer.cc @@ -2,7 +2,7 @@ #include "GLES3Buffer.h" #include "GLES3Commands.h" -NS_CC_BEGIN +namespace cc { GLES3Buffer::GLES3Buffer(GFXDevice *device) : GFXBuffer(device) { @@ -107,4 +107,4 @@ void GLES3Buffer::update(void *buffer, uint offset, uint size) { GLES3CmdFuncUpdateBuffer((GLES3Device *)_device, _gpuBuffer, buffer, offset, size); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Buffer.h b/native/cocos/renderer/gfx-gles3/GLES3Buffer.h index 82258619c2..ac675d6154 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Buffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Buffer.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_BUFFER_H_ #define CC_GFXGLES3_GLES3_BUFFER_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUBuffer; @@ -22,6 +22,6 @@ private: GLES3GPUBuffer *_gpuBuffer = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandAllocator.cc b/native/cocos/renderer/gfx-gles3/GLES3CommandAllocator.cc index 8f4d29cb1b..ed25360af0 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandAllocator.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandAllocator.cc @@ -1,7 +1,7 @@ #include "GLES3Std.h" #include "GLES3CommandAllocator.h" -NS_CC_BEGIN +namespace cc { GLES3CommandAllocator::GLES3CommandAllocator(GFXDevice *device) : GFXCommandAllocator(device) { @@ -39,4 +39,4 @@ void GLES3CommandAllocator::clearCmds(GLES3CmdPackage *cmd_package) { cmd_package->cmds.clear(); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandAllocator.h b/native/cocos/renderer/gfx-gles3/GLES3CommandAllocator.h index 325995ed4c..d744498128 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandAllocator.h +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandAllocator.h @@ -4,7 +4,7 @@ #include "gfx/GFXCommandPool.h" #include "GLES3Commands.h" -NS_CC_BEGIN +namespace cc { class CC_GLES3_API GLES3CommandAllocator : public GFXCommandAllocator { public: @@ -32,6 +32,6 @@ public: } }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cc b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cc index 7cb38ddf27..e4d163bf5c 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cc @@ -8,7 +8,7 @@ #include "GLES3Buffer.h" #include "GLES3Texture.h" -NS_CC_BEGIN +namespace cc { GLES3CommandBuffer::GLES3CommandBuffer(GFXDevice *device) : GFXCommandBuffer(device) { @@ -325,4 +325,4 @@ void GLES3CommandBuffer::BindStates() { _isStateInvalid = false; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h index 73bcc8d3f7..b7519d9537 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h @@ -3,7 +3,7 @@ #include "GLES3Commands.h" -NS_CC_BEGIN +namespace cc { class GLES3CommandAllocator; @@ -59,6 +59,6 @@ private: bool _isStateInvalid = false; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Commands.cc b/native/cocos/renderer/gfx-gles3/GLES3Commands.cc index bbad3b2746..907c5aa460 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Commands.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Commands.cc @@ -5,7 +5,7 @@ #define BUFFER_OFFSET(idx) (static_cast(0) + (idx)) -NS_CC_BEGIN +namespace cc { namespace { GLenum MapGLInternalFormat(GFXFormat format) { @@ -2215,4 +2215,4 @@ void GLES3CmdFuncCopyBuffersToTexture(GLES3Device *device, uint8_t *const *buffe } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Commands.h b/native/cocos/renderer/gfx-gles3/GLES3Commands.h index 842e31798b..49e2d0b0c8 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Commands.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Commands.h @@ -3,7 +3,7 @@ #include "GLES3GPUObjects.h" -NS_CC_BEGIN +namespace cc { class GLES3Device; @@ -168,6 +168,6 @@ CC_GLES3_API void GLES3CmdFuncDestroyFramebuffer(GLES3Device *device, GLES3GPUFr CC_GLES3_API void GLES3CmdFuncExecuteCmds(GLES3Device *device, GLES3CmdPackage *cmd_package); CC_GLES3_API void GLES3CmdFuncCopyBuffersToTexture(GLES3Device *device, uint8_t *const *buffers, GLES3GPUTexture *gpuTexture, const GFXBufferTextureCopyList ®ions); -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Context.cc b/native/cocos/renderer/gfx-gles3/GLES3Context.cc index 5ac7e4a75b..8106546d64 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Context.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Context.cc @@ -11,7 +11,7 @@ // #define CC_GFX_DEBUG -NS_CC_BEGIN +namespace cc { #if (CC_PLATFORM == CC_PLATFORM_WINDOWS) @@ -458,4 +458,4 @@ bool GLES3Context::CheckExtension(const String &extension) const { return (std::find(_extensions.begin(), _extensions.end(), extension) != _extensions.end()); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Context.h b/native/cocos/renderer/gfx-gles3/GLES3Context.h index d46fa5d6b5..b5b98bdf0e 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Context.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Context.h @@ -28,7 +28,7 @@ #define EGL_OPENGL_ES3_BIT_KHR 0x00000040 #endif -NS_CC_BEGIN +namespace cc { class CC_GLES3_API GLES3Context : public GFXContext { public: @@ -88,6 +88,6 @@ private: bool _isInitialized = false; }; -NS_CC_END +} #endif // CC_GFXGLES3_GLES3_EGL_CONTEXT_H_ diff --git a/native/cocos/renderer/gfx-gles3/GLES3Context.mm b/native/cocos/renderer/gfx-gles3/GLES3Context.mm index 935091e706..59e9b24fca 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Context.mm +++ b/native/cocos/renderer/gfx-gles3/GLES3Context.mm @@ -4,7 +4,7 @@ #import #import -NS_CC_BEGIN +namespace cc { #if (CC_PLATFORM == CC_PLATFORM_MAC_IOS) @@ -195,4 +195,4 @@ bool GLES3Context::MakeCurrentImpl() #endif -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Device.cc b/native/cocos/renderer/gfx-gles3/GLES3Device.cc index 7e19c2f0e0..b5d3c3ebce 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Device.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Device.cc @@ -18,7 +18,7 @@ #include "GLES3StateCache.h" #include "GLES3Texture.h" -NS_CC_BEGIN +namespace cc { GLES3Device::GLES3Device() { } @@ -302,4 +302,4 @@ void GLES3Device::copyBuffersToTexture(const GFXDataArray &buffers, GFXTexture * GLES3CmdFuncCopyBuffersToTexture(this, buffers.datas.data(), ((GLES3Texture *)dst)->gpuTexture(), regions); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Device.h b/native/cocos/renderer/gfx-gles3/GLES3Device.h index 4d0911f25c..1d46b3b520 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Device.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Device.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_DEVICE_H_ #define CC_GFXGLES3_GLES3_DEVICE_H_ -NS_CC_BEGIN +namespace cc { class GLES3StateCache; @@ -51,6 +51,6 @@ private: bool _useVAO = true; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Fence.cc b/native/cocos/renderer/gfx-gles3/GLES3Fence.cc index a6bff26516..29e2d03ea2 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Fence.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Fence.cc @@ -3,7 +3,7 @@ #include "GLES3Device.h" #include "GLES3GPUObjects.h" -NS_CC_BEGIN +namespace cc { GLES3Fence::GLES3Fence(GFXDevice* device) : GFXFence(device) @@ -51,4 +51,4 @@ void GLES3Fence::reset() // TODO } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Fence.h b/native/cocos/renderer/gfx-gles3/GLES3Fence.h index 496556fdcd..f0a8a99b22 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Fence.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Fence.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_FENCE_H_ #define CC_GFXGLES3_GLES3_FENCE_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUFence; @@ -20,6 +20,6 @@ private: GLES3GPUFence* _gpuFence = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cc b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cc index d26a06e596..fe26fa404c 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cc @@ -5,7 +5,7 @@ #include "GLES3Context.h" #include "GLES3Texture.h" -NS_CC_BEGIN +namespace cc { GLES3Framebuffer::GLES3Framebuffer(GFXDevice *device) : GFXFramebuffer(device) { @@ -62,4 +62,4 @@ void GLES3Framebuffer::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h index d0a64e5876..b66d117b57 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_FRAMEBUFFER_H_ #define CC_GFXGLES3_GLES3_FRAMEBUFFER_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUFramebuffer; @@ -20,6 +20,6 @@ private: GLES3GPUFramebuffer *_gpuFBO = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h b/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h index ffcf6dcb99..06298df0ba 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h +++ b/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h @@ -3,7 +3,7 @@ #include "gles3w.h" -NS_CC_BEGIN +namespace cc { class GLES3GPUBuffer : public Object { public: @@ -209,6 +209,6 @@ class GLES3GPUFence : public Object { public: }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.cc b/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.cc index 03a80b03c1..509e5bcae8 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.cc @@ -3,7 +3,7 @@ #include "GLES3Commands.h" #include "GLES3Buffer.h" -NS_CC_BEGIN +namespace cc { GLES3InputAssembler::GLES3InputAssembler(GFXDevice *device) : GFXInputAssembler(device) { @@ -64,4 +64,4 @@ void GLES3InputAssembler::ExtractCmdDraw(GLES3CmdDraw *cmd) { cmd->draw_info.firstInstance = _firstInstance; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.h b/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.h index a2f7faae8f..3513b83d58 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.h +++ b/native/cocos/renderer/gfx-gles3/GLES3InputAssembler.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_INPUT_ASSEMBLER_H_ #define CC_GFXGLES3_GLES3_INPUT_ASSEMBLER_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUInputAssembler; class GLES3CmdDraw; @@ -23,6 +23,6 @@ private: GLES3GPUInputAssembler *_gpuInputAssembler = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.cc b/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.cc index 72c99ac5c7..f7c23746a2 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.cc @@ -2,7 +2,7 @@ #include "GLES3PipelineLayout.h" #include "GLES3Commands.h" -NS_CC_BEGIN +namespace cc { GLES3PipelineLayout::GLES3PipelineLayout(GFXDevice *device) : GFXPipelineLayout(device) { @@ -29,4 +29,4 @@ void GLES3PipelineLayout::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.h b/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.h index 3ded9df994..967b75a475 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.h +++ b/native/cocos/renderer/gfx-gles3/GLES3PipelineLayout.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_PIPELINE_LAYOUT_H_ #define CC_GFXGLES3_GLES3_PIPELINE_LAYOUT_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUPipelineLayout; @@ -20,6 +20,6 @@ private: GLES3GPUPipelineLayout *_gpuPipelineLayout = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3PipelineState.cc b/native/cocos/renderer/gfx-gles3/GLES3PipelineState.cc index a6a39665e0..7b04af2602 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PipelineState.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3PipelineState.cc @@ -5,7 +5,7 @@ #include "GLES3RenderPass.h" #include "GLES3PipelineLayout.h" -NS_CC_BEGIN +namespace cc { const GLenum GLES3Primitives[] = { GL_POINTS, @@ -66,4 +66,4 @@ void GLES3PipelineState::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3PipelineState.h b/native/cocos/renderer/gfx-gles3/GLES3PipelineState.h index b724d21902..8d39bd1014 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PipelineState.h +++ b/native/cocos/renderer/gfx-gles3/GLES3PipelineState.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_PIPELINE_STATE_H_ #define CC_GFXGLES3_GLES3_PIPELINE_STATE_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUPipelineState; @@ -20,6 +20,6 @@ private: GLES3GPUPipelineState *_gpuPipelineState = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Queue.cc b/native/cocos/renderer/gfx-gles3/GLES3Queue.cc index 560a62726f..cd5fd5027b 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Queue.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Queue.cc @@ -3,7 +3,7 @@ #include "GLES3Commands.h" #include "GLES3CommandBuffer.h" -NS_CC_BEGIN +namespace cc { GLES3Queue::GLES3Queue(GFXDevice *device) : GFXQueue(device) { @@ -36,4 +36,4 @@ void GLES3Queue::submit(const vector::type &cmdBuffs, GFXFen } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Queue.h b/native/cocos/renderer/gfx-gles3/GLES3Queue.h index 0fa47321ee..abd46b9402 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Queue.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Queue.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_QUEUE_H_ #define CC_GFXGLES3_GLES3_QUEUE_H_ -NS_CC_BEGIN +namespace cc { class CC_GLES3_API GLES3Queue : public GFXQueue { public: @@ -24,6 +24,6 @@ private: uint _numTriangles = 0; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cc b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cc index 91e96bf5b7..671acd9be3 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cc @@ -2,7 +2,7 @@ #include "GLES3RenderPass.h" #include "GLES3Commands.h" -NS_CC_BEGIN +namespace cc { GLES3RenderPass::GLES3RenderPass(GFXDevice *device) : GFXRenderPass(device) { @@ -35,4 +35,4 @@ void GLES3RenderPass::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.h b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.h index f76f31e13a..73d25d1ef3 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.h +++ b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_RENDER_PASS_H_ #define CC_GFXGLES3_GLES3_RENDER_PASS_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPURenderPass; @@ -20,6 +20,6 @@ private: GLES3GPURenderPass *_gpuRenderPass = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Sampler.cc b/native/cocos/renderer/gfx-gles3/GLES3Sampler.cc index 3ac7b13f5a..15c413f462 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Sampler.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Sampler.cc @@ -2,7 +2,7 @@ #include "GLES3Sampler.h" #include "GLES3Commands.h" -NS_CC_BEGIN +namespace cc { GLES3Sampler::GLES3Sampler(GFXDevice *device) : GFXSampler(device) { @@ -52,4 +52,4 @@ void GLES3Sampler::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Sampler.h b/native/cocos/renderer/gfx-gles3/GLES3Sampler.h index 060671c3b4..ae348c8834 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Sampler.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Sampler.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_SAMPLER_H_ #define CC_GFXGLES3_GLES3_SAMPLER_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUSampler; @@ -20,6 +20,6 @@ private: GLES3GPUSampler *_gpuSampler = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Shader.cc b/native/cocos/renderer/gfx-gles3/GLES3Shader.cc index 32534e0674..ded96b6947 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Shader.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Shader.cc @@ -2,7 +2,7 @@ #include "GLES3Shader.h" #include "GLES3Commands.h" -NS_CC_BEGIN +namespace cc { GLES3Shader::GLES3Shader(GFXDevice *device) : GFXShader(device) { @@ -44,4 +44,4 @@ void GLES3Shader::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Shader.h b/native/cocos/renderer/gfx-gles3/GLES3Shader.h index 07549b2467..dddf982786 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Shader.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Shader.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_SHADER_H_ #define CC_GFXGLES3_GLES3_SHADER_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUShader; @@ -20,6 +20,6 @@ private: GLES3GPUShader *_gpuShader = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3StateCache.h b/native/cocos/renderer/gfx-gles3/GLES3StateCache.h index 5f06dfd194..68f8c1bb3f 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3StateCache.h +++ b/native/cocos/renderer/gfx-gles3/GLES3StateCache.h @@ -3,7 +3,7 @@ #include "gles3w.h" -NS_CC_BEGIN +namespace cc { class GLES3StateCache : public Object { public: @@ -31,6 +31,6 @@ public: GLES3StateCache() {} }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-gles3/GLES3Texture.cc b/native/cocos/renderer/gfx-gles3/GLES3Texture.cc index 62a0b54794..c6d376a61d 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Texture.cc +++ b/native/cocos/renderer/gfx-gles3/GLES3Texture.cc @@ -2,7 +2,7 @@ #include "GLES3Texture.h" #include "GLES3Commands.h" -NS_CC_BEGIN +namespace cc { GLES3Texture::GLES3Texture(GFXDevice *device) : GFXTexture(device) { @@ -118,4 +118,4 @@ void GLES3Texture::resize(uint width, uint height) { } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-gles3/GLES3Texture.h b/native/cocos/renderer/gfx-gles3/GLES3Texture.h index bcbf4dd6a9..7cffd1d232 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Texture.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Texture.h @@ -1,7 +1,7 @@ #ifndef CC_GFXGLES3_GLES3_TEXTURE_H_ #define CC_GFXGLES3_GLES3_TEXTURE_H_ -NS_CC_BEGIN +namespace cc { class GLES3GPUTexture; @@ -22,6 +22,6 @@ private: GLES3GPUTexture *_gpuTexture = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-metal/MTLBindingLayout.cpp b/native/cocos/renderer/gfx-metal/MTLBindingLayout.cpp index 78e176cbc9..fd002bf38c 100644 --- a/native/cocos/renderer/gfx-metal/MTLBindingLayout.cpp +++ b/native/cocos/renderer/gfx-metal/MTLBindingLayout.cpp @@ -1,7 +1,7 @@ #include "MTLStd.h" #include "MTLBindingLayout.h" -NS_CC_BEGIN +namespace cc { CCMTLBindingLayout::CCMTLBindingLayout(GFXDevice *device) : GFXBindingLayout(device) {} CCMTLBindingLayout::~CCMTLBindingLayout() { destroy(); } @@ -30,4 +30,4 @@ void CCMTLBindingLayout::destroy() { void CCMTLBindingLayout::update() { } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLBindingLayout.h b/native/cocos/renderer/gfx-metal/MTLBindingLayout.h index 6c946440f6..bd4625c706 100644 --- a/native/cocos/renderer/gfx-metal/MTLBindingLayout.h +++ b/native/cocos/renderer/gfx-metal/MTLBindingLayout.h @@ -1,6 +1,6 @@ #pragma once -NS_CC_BEGIN +namespace cc { class CCMTLBindingLayout : public GFXBindingLayout { public: @@ -12,4 +12,4 @@ public: virtual void update() override; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLBuffer.h b/native/cocos/renderer/gfx-metal/MTLBuffer.h index 15fc3c108f..79e89146be 100644 --- a/native/cocos/renderer/gfx-metal/MTLBuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLBuffer.h @@ -4,7 +4,7 @@ #import #import -NS_CC_BEGIN +namespace cc { class CCMTLBuffer : public GFXBuffer { public: @@ -37,4 +37,4 @@ private: uint8_t *_bufferBytes = nullptr; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLBuffer.mm b/native/cocos/renderer/gfx-metal/MTLBuffer.mm index 631584233f..0ef5a39e06 100644 --- a/native/cocos/renderer/gfx-metal/MTLBuffer.mm +++ b/native/cocos/renderer/gfx-metal/MTLBuffer.mm @@ -6,7 +6,7 @@ #define MINIMUMR_REQUIRED_SIZE_4KB 4096 -NS_CC_BEGIN +namespace cc { CCMTLBuffer::CCMTLBuffer(GFXDevice *device) : GFXBuffer(device) {} @@ -244,4 +244,4 @@ void CCMTLBuffer::encodeBuffer(id encoder, uint offset, } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLCommandAllocator.h b/native/cocos/renderer/gfx-metal/MTLCommandAllocator.h index d3a3da5796..61a29b1302 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandAllocator.h +++ b/native/cocos/renderer/gfx-metal/MTLCommandAllocator.h @@ -3,7 +3,7 @@ #include "gfx/GFXCommandPool.h" #include "MTLCommands.h" -NS_CC_BEGIN +namespace cc { class CCMTLCommandPackage; @@ -34,4 +34,4 @@ private: GFXCommandPool _copyBufferToTextureCmdPool; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLCommandAllocator.mm b/native/cocos/renderer/gfx-metal/MTLCommandAllocator.mm index fa64f4f8f2..a3fa0bf101 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandAllocator.mm +++ b/native/cocos/renderer/gfx-metal/MTLCommandAllocator.mm @@ -3,7 +3,7 @@ #include "MTLCommandAllocator.h" #include "MTLCommands.h" -NS_CC_BEGIN +namespace cc { CCMTLCommandAllocator::CCMTLCommandAllocator(GFXDevice *device) : GFXCommandAllocator(device) {} CCMTLCommandAllocator::~CCMTLCommandAllocator() { destroy(); } @@ -37,4 +37,4 @@ void CCMTLCommandAllocator::clearCommands(CCMTLCommandPackage *commandPackage) { commandPackage->commandTypes.clear(); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h index 234128d5fd..cc1075eec0 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h @@ -1,6 +1,6 @@ #pragma once -NS_CC_BEGIN +namespace cc { class CCMTLCommandPackage; class CCMTLCommandAllocator; @@ -64,4 +64,4 @@ private: std::array _dynamicStateDirty = {false, false, false, false, false, false, false, false}; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm index 6d43724788..ab94808338 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm +++ b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm @@ -12,7 +12,7 @@ #import -NS_CC_BEGIN +namespace cc { CCMTLCommandBuffer::CCMTLCommandBuffer(GFXDevice *device) : GFXCommandBuffer(device) {} CCMTLCommandBuffer::~CCMTLCommandBuffer() { destroy(); } @@ -292,4 +292,4 @@ void CCMTLCommandBuffer::bindStates() { std::fill(_dynamicStateDirty.begin(), _dynamicStateDirty.end(), false); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLCommands.h b/native/cocos/renderer/gfx-metal/MTLCommands.h index 33fa43eb30..a33b6ea06f 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommands.h +++ b/native/cocos/renderer/gfx-metal/MTLCommands.h @@ -2,7 +2,7 @@ #import -NS_CC_BEGIN +namespace cc { class CCMTLFramebuffer; struct CCMTLGPUPipelineState; @@ -107,4 +107,4 @@ public: CachedArray copyBufferToTextureCmds; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLCommands.mm b/native/cocos/renderer/gfx-metal/MTLCommands.mm index d48e282496..ecf4a458be 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommands.mm +++ b/native/cocos/renderer/gfx-metal/MTLCommands.mm @@ -1,7 +1,7 @@ #include "MTLStd.h" #include "MTLCommands.h" -NS_CC_BEGIN +namespace cc { -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLContext.h b/native/cocos/renderer/gfx-metal/MTLContext.h index 1776d8ab11..da1d1b12f9 100644 --- a/native/cocos/renderer/gfx-metal/MTLContext.h +++ b/native/cocos/renderer/gfx-metal/MTLContext.h @@ -1,6 +1,7 @@ #pragma once -NS_CC_BEGIN +namespace cc { + class CCMTLContext : public GFXContext { public: @@ -12,4 +13,4 @@ public: void present() override{}; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLContext.mm b/native/cocos/renderer/gfx-metal/MTLContext.mm index e2cf008b75..c05535fcd6 100644 --- a/native/cocos/renderer/gfx-metal/MTLContext.mm +++ b/native/cocos/renderer/gfx-metal/MTLContext.mm @@ -6,7 +6,8 @@ #import -NS_CC_BEGIN +namespace cc { + namespace { GFXFormat toGFXFormat(MTLPixelFormat format) { switch (format) { @@ -38,4 +39,4 @@ bool CCMTLContext::initialize(const GFXContextInfo &info) { return true; } -NS_CC_END +} // end of namespace cc diff --git a/native/cocos/renderer/gfx-metal/MTLDevice.h b/native/cocos/renderer/gfx-metal/MTLDevice.h index 69d24c9779..b733d715bb 100644 --- a/native/cocos/renderer/gfx-metal/MTLDevice.h +++ b/native/cocos/renderer/gfx-metal/MTLDevice.h @@ -1,6 +1,6 @@ #pragma once -NS_CC_BEGIN +namespace cc { class CCMTLStateCache; @@ -50,4 +50,4 @@ private: void *_blitedBuffer = nullptr; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLDevice.mm b/native/cocos/renderer/gfx-metal/MTLDevice.mm index 77fddcc7cf..516aaf692a 100644 --- a/native/cocos/renderer/gfx-metal/MTLDevice.mm +++ b/native/cocos/renderer/gfx-metal/MTLDevice.mm @@ -22,7 +22,7 @@ #import -NS_CC_BEGIN +namespace cc { CCMTLDevice::CCMTLDevice() {} CCMTLDevice::~CCMTLDevice() {} @@ -302,4 +302,4 @@ void CCMTLDevice::blitBuffer(void *srcData, uint offset, uint size, void *dstBuf [commandBuffer commit]; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLFence.h b/native/cocos/renderer/gfx-metal/MTLFence.h index 6e3fa4f087..0fbd08e691 100644 --- a/native/cocos/renderer/gfx-metal/MTLFence.h +++ b/native/cocos/renderer/gfx-metal/MTLFence.h @@ -1,6 +1,6 @@ #pragma once -NS_CC_BEGIN +namespace cc { class CCMTLFence : public GFXFence { public: @@ -15,4 +15,4 @@ public: private: }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLFence.mm b/native/cocos/renderer/gfx-metal/MTLFence.mm index a83e8d7810..9d8bcfb91b 100644 --- a/native/cocos/renderer/gfx-metal/MTLFence.mm +++ b/native/cocos/renderer/gfx-metal/MTLFence.mm @@ -3,7 +3,7 @@ #include "MTLDevice.h" #include "MTLFence.h" -NS_CC_BEGIN +namespace cc { CCMTLFence::CCMTLFence(GFXDevice *device) : GFXFence(device) {} @@ -32,4 +32,4 @@ void CCMTLFence::reset() { // TODO } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLFrameBuffer.h b/native/cocos/renderer/gfx-metal/MTLFrameBuffer.h index a8ac19191a..c58d8a236a 100644 --- a/native/cocos/renderer/gfx-metal/MTLFrameBuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLFrameBuffer.h @@ -1,6 +1,6 @@ #pragma once -NS_CC_BEGIN +namespace cc { class CCMTLFramebuffer : public GFXFramebuffer { public: @@ -11,4 +11,4 @@ public: virtual void destroy() override; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLFramebuffer.mm b/native/cocos/renderer/gfx-metal/MTLFramebuffer.mm index aad7b60640..40ce952f27 100644 --- a/native/cocos/renderer/gfx-metal/MTLFramebuffer.mm +++ b/native/cocos/renderer/gfx-metal/MTLFramebuffer.mm @@ -4,7 +4,7 @@ #include "MTLRenderPass.h" #include "MTLTexture.h" -NS_CC_BEGIN +namespace cc { CCMTLFramebuffer::CCMTLFramebuffer(GFXDevice *device) : GFXFramebuffer(device) {} CCMTLFramebuffer::~CCMTLFramebuffer() { destroy(); } @@ -46,4 +46,4 @@ void CCMTLFramebuffer::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLGPUObjects.h b/native/cocos/renderer/gfx-metal/MTLGPUObjects.h index 61d9346826..7befe7ce00 100644 --- a/native/cocos/renderer/gfx-metal/MTLGPUObjects.h +++ b/native/cocos/renderer/gfx-metal/MTLGPUObjects.h @@ -7,7 +7,7 @@ #import #import -NS_CC_BEGIN +namespace cc { struct CCMTLGPUUniformBlock { uint mtlBinding = 0; @@ -59,4 +59,4 @@ public: std::vector> mtlVertexBufers; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLInputAssembler.h b/native/cocos/renderer/gfx-metal/MTLInputAssembler.h index 69fff05ff3..4d65bb212a 100644 --- a/native/cocos/renderer/gfx-metal/MTLInputAssembler.h +++ b/native/cocos/renderer/gfx-metal/MTLInputAssembler.h @@ -1,6 +1,6 @@ #pragma once -NS_CC_BEGIN +namespace cc { class CCMTLCmdDraw; class CCMTLGPUInputAssembler; @@ -23,4 +23,4 @@ private: CCMTLGPUInputAssembler *_GPUInputAssembler = nullptr; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLInputAssembler.mm b/native/cocos/renderer/gfx-metal/MTLInputAssembler.mm index a9c2e3d778..3489d91fef 100644 --- a/native/cocos/renderer/gfx-metal/MTLInputAssembler.mm +++ b/native/cocos/renderer/gfx-metal/MTLInputAssembler.mm @@ -5,7 +5,7 @@ #include "MTLGPUObjects.h" #include "MTLInputAssembler.h" -NS_CC_BEGIN +namespace cc { CCMTLInputAssembler::CCMTLInputAssembler(GFXDevice *device) : GFXInputAssembler(device) {} CCMTLInputAssembler::~CCMTLInputAssembler() { destroy(); } @@ -54,4 +54,4 @@ void CCMTLInputAssembler::extractDrawInfo(CCMTLCmdDraw *cmd) const { cmd->drawInfo.firstInstance = _firstInstance; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLPipelineLayout.cpp b/native/cocos/renderer/gfx-metal/MTLPipelineLayout.cpp index 461c531207..a586f8e0ec 100644 --- a/native/cocos/renderer/gfx-metal/MTLPipelineLayout.cpp +++ b/native/cocos/renderer/gfx-metal/MTLPipelineLayout.cpp @@ -1,7 +1,7 @@ #include "MTLStd.h" #include "MTLPipelineLayout.h" -NS_CC_BEGIN +namespace cc { CCMTLPipelineLayout::CCMTLPipelineLayout(GFXDevice *device) : GFXPipelineLayout(device) {} CCMTLPipelineLayout::~CCMTLPipelineLayout() { destroy(); } @@ -18,4 +18,4 @@ void CCMTLPipelineLayout::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLPipelineLayout.h b/native/cocos/renderer/gfx-metal/MTLPipelineLayout.h index 4e9aefdbaf..3631f37a6e 100644 --- a/native/cocos/renderer/gfx-metal/MTLPipelineLayout.h +++ b/native/cocos/renderer/gfx-metal/MTLPipelineLayout.h @@ -1,6 +1,6 @@ #pragma once -NS_CC_BEGIN +namespace cc { class CCMTLPipelineLayout : public GFXPipelineLayout { public: @@ -11,4 +11,4 @@ public: virtual void destroy() override; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLPipelineState.h b/native/cocos/renderer/gfx-metal/MTLPipelineState.h index 078781dddf..079ff34b4d 100644 --- a/native/cocos/renderer/gfx-metal/MTLPipelineState.h +++ b/native/cocos/renderer/gfx-metal/MTLPipelineState.h @@ -6,7 +6,7 @@ #import #import -NS_CC_BEGIN +namespace cc { class CCMTLPipelineState : public GFXPipelineState { public: @@ -35,4 +35,4 @@ private: CCMTLGPUPipelineState *_GPUPipelieState = nullptr; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLPipelineState.mm b/native/cocos/renderer/gfx-metal/MTLPipelineState.mm index b81de3fc08..5e539b5b75 100644 --- a/native/cocos/renderer/gfx-metal/MTLPipelineState.mm +++ b/native/cocos/renderer/gfx-metal/MTLPipelineState.mm @@ -13,7 +13,7 @@ #import #import -NS_CC_BEGIN +namespace cc { CCMTLPipelineState::CCMTLPipelineState(GFXDevice *device) : GFXPipelineState(device) {} CCMTLPipelineState::~CCMTLPipelineState() { destroy(); } @@ -252,4 +252,4 @@ bool CCMTLPipelineState::createMTLRenderPipeline(MTLRenderPipelineDescriptor *de return true; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLQueue.h b/native/cocos/renderer/gfx-metal/MTLQueue.h index 2e216ce6ad..da581f1c77 100644 --- a/native/cocos/renderer/gfx-metal/MTLQueue.h +++ b/native/cocos/renderer/gfx-metal/MTLQueue.h @@ -3,7 +3,7 @@ #import #import -NS_CC_BEGIN +namespace cc { class CCMTLCommandPackage; @@ -30,4 +30,4 @@ private: uint _numTriangles = 0; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLQueue.mm b/native/cocos/renderer/gfx-metal/MTLQueue.mm index 664a664215..dcc91fb341 100644 --- a/native/cocos/renderer/gfx-metal/MTLQueue.mm +++ b/native/cocos/renderer/gfx-metal/MTLQueue.mm @@ -19,7 +19,7 @@ #import -NS_CC_BEGIN +namespace cc { CCMTLQueue::CCMTLQueue(GFXDevice *device) : GFXQueue(device) {} @@ -306,4 +306,4 @@ void CCMTLQueue::executeCommands(const CCMTLCommandPackage *commandPackage, id #import -NS_CC_BEGIN +namespace cc { class GFXTextureView; @@ -27,4 +27,4 @@ private: size_t _colorRenderTargetNums = 0; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLRenderPass.mm b/native/cocos/renderer/gfx-metal/MTLRenderPass.mm index e6d268860f..d3ec892fad 100644 --- a/native/cocos/renderer/gfx-metal/MTLRenderPass.mm +++ b/native/cocos/renderer/gfx-metal/MTLRenderPass.mm @@ -4,7 +4,7 @@ #include "MTLRenderPass.h" #include "MTLUtils.h" -NS_CC_BEGIN +namespace cc { CCMTLRenderPass::CCMTLRenderPass(GFXDevice *device) : GFXRenderPass(device) {} CCMTLRenderPass::~CCMTLRenderPass() { destroy(); } @@ -77,4 +77,4 @@ void CCMTLRenderPass::setDepthStencilAttachment(id texture, int leve _status = GFXStatus::SUCCESS; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLSampler.h b/native/cocos/renderer/gfx-metal/MTLSampler.h index c7cb60936f..7d0ff90fcd 100644 --- a/native/cocos/renderer/gfx-metal/MTLSampler.h +++ b/native/cocos/renderer/gfx-metal/MTLSampler.h @@ -2,7 +2,7 @@ #import -NS_CC_BEGIN +namespace cc { class CCMTLSampler : public GFXSampler { public: @@ -18,4 +18,4 @@ private: id _mtlSamplerState = nil; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLSampler.mm b/native/cocos/renderer/gfx-metal/MTLSampler.mm index 0f6729a7e6..b610dd025c 100644 --- a/native/cocos/renderer/gfx-metal/MTLSampler.mm +++ b/native/cocos/renderer/gfx-metal/MTLSampler.mm @@ -6,7 +6,7 @@ #import -NS_CC_BEGIN +namespace cc { CCMTLSampler::CCMTLSampler(GFXDevice *device) : GFXSampler(device) {} CCMTLSampler::~CCMTLSampler() { destroy(); } @@ -58,4 +58,4 @@ void CCMTLSampler::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLShader.h b/native/cocos/renderer/gfx-metal/MTLShader.h index a920b7a6ff..caa5e96897 100644 --- a/native/cocos/renderer/gfx-metal/MTLShader.h +++ b/native/cocos/renderer/gfx-metal/MTLShader.h @@ -3,7 +3,7 @@ #import #import -NS_CC_BEGIN +namespace cc { class CCMTLShader : public GFXShader { public: @@ -43,4 +43,4 @@ private: #endif }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLShader.mm b/native/cocos/renderer/gfx-metal/MTLShader.mm index dd7d3b2c99..36d5e6a622 100644 --- a/native/cocos/renderer/gfx-metal/MTLShader.mm +++ b/native/cocos/renderer/gfx-metal/MTLShader.mm @@ -5,7 +5,7 @@ #include "MTLUtils.h" #import -NS_CC_BEGIN +namespace cc { CCMTLShader::CCMTLShader(GFXDevice *device) : GFXShader(device) {} CCMTLShader::~CCMTLShader() { destroy(); } @@ -93,4 +93,4 @@ bool CCMTLShader::createMTLFunction(const GFXShaderStage &stage) { return true; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLStateCache.h b/native/cocos/renderer/gfx-metal/MTLStateCache.h index e99ca6b641..1be2d83dcd 100644 --- a/native/cocos/renderer/gfx-metal/MTLStateCache.h +++ b/native/cocos/renderer/gfx-metal/MTLStateCache.h @@ -1,9 +1,9 @@ #pragma once -NS_CC_BEGIN +namespace cc { class CCMTLStateCache : public Object { public: }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLTexture.h b/native/cocos/renderer/gfx-metal/MTLTexture.h index 387e040d1f..62e47bc6bf 100644 --- a/native/cocos/renderer/gfx-metal/MTLTexture.h +++ b/native/cocos/renderer/gfx-metal/MTLTexture.h @@ -2,7 +2,7 @@ #import -NS_CC_BEGIN +namespace cc { class CCMTLTexture : public GFXTexture { friend class CCMTLDevice; @@ -30,4 +30,4 @@ private: GFXFormat _convertedFormat = GFXFormat::UNKNOWN; }; -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLTexture.mm b/native/cocos/renderer/gfx-metal/MTLTexture.mm index d53adcc5d3..5a3f1687ba 100644 --- a/native/cocos/renderer/gfx-metal/MTLTexture.mm +++ b/native/cocos/renderer/gfx-metal/MTLTexture.mm @@ -5,7 +5,7 @@ #include "MTLUtils.h" #include -NS_CC_BEGIN +namespace cc { namespace { uint8_t *convertData(uint8_t *source, uint length, GFXFormat type) { @@ -271,4 +271,4 @@ void CCMTLTexture::generateMipmaps() { [mtlCommandBuffer commit]; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLUtils.h b/native/cocos/renderer/gfx-metal/MTLUtils.h index 5666ca9225..441335ff20 100644 --- a/native/cocos/renderer/gfx-metal/MTLUtils.h +++ b/native/cocos/renderer/gfx-metal/MTLUtils.h @@ -9,7 +9,7 @@ #include -NS_CC_BEGIN +namespace cc { namespace mu { MTLResourceOptions toMTLResourseOption(GFXMemoryUsage usage); @@ -63,4 +63,4 @@ bool isDepthStencilFormatSupported(GFXFormat format, uint family); String featureSetToString(MTLFeatureSet featureSet); } // namespace mu -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-metal/MTLUtils.mm b/native/cocos/renderer/gfx-metal/MTLUtils.mm index 22363ac198..dbd49ff485 100644 --- a/native/cocos/renderer/gfx-metal/MTLUtils.mm +++ b/native/cocos/renderer/gfx-metal/MTLUtils.mm @@ -5,7 +5,7 @@ #include "spirv_cross/spirv_msl.hpp" #include -NS_CC_BEGIN +namespace cc { namespace { const TBuiltInResource DefaultTBuiltInResource = { /* .MaxLights = */ 32, @@ -1247,4 +1247,4 @@ String featureSetToString(MTLFeatureSet featureSet) { } //namespace mu -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKBindingLayout.cc b/native/cocos/renderer/gfx-vulkan/VKBindingLayout.cc index 8c196be1b5..0aae6c34ad 100644 --- a/native/cocos/renderer/gfx-vulkan/VKBindingLayout.cc +++ b/native/cocos/renderer/gfx-vulkan/VKBindingLayout.cc @@ -7,7 +7,7 @@ #include "VKSampler.h" #include "VKTexture.h" -NS_CC_BEGIN +namespace cc { CCVKBindingLayout::CCVKBindingLayout(GFXDevice *device) : GFXBindingLayout(device) { @@ -93,4 +93,4 @@ void CCVKBindingLayout::update() { } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKBindingLayout.h b/native/cocos/renderer/gfx-vulkan/VKBindingLayout.h index 17b2a97a39..0bbf694f6e 100644 --- a/native/cocos/renderer/gfx-vulkan/VKBindingLayout.h +++ b/native/cocos/renderer/gfx-vulkan/VKBindingLayout.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_BINDING_LAYOUT_H_ #define CC_GFXVULKAN_CCVK_BINDING_LAYOUT_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUBindingLayout; @@ -21,6 +21,6 @@ private: CCVKGPUBindingLayout *_gpuBindingLayout = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKBuffer.cc b/native/cocos/renderer/gfx-vulkan/VKBuffer.cc index 8be04b29ce..4d340eac4d 100644 --- a/native/cocos/renderer/gfx-vulkan/VKBuffer.cc +++ b/native/cocos/renderer/gfx-vulkan/VKBuffer.cc @@ -3,7 +3,7 @@ #include "VKBuffer.h" #include "VKCommands.h" -NS_CC_BEGIN +namespace cc { CCVKBuffer::CCVKBuffer(GFXDevice *device) : GFXBuffer(device) { @@ -91,4 +91,4 @@ void CCVKBuffer::update(void *buffer, uint offset, uint size) { CCVKCmdFuncUpdateBuffer((CCVKDevice *)_device, _gpuBuffer, buffer, offset, size); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKBuffer.h b/native/cocos/renderer/gfx-vulkan/VKBuffer.h index 50aef8e116..1526c508dd 100644 --- a/native/cocos/renderer/gfx-vulkan/VKBuffer.h +++ b/native/cocos/renderer/gfx-vulkan/VKBuffer.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_BUFFER_H_ #define CC_GFXVULKAN_CCVK_BUFFER_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUBuffer; @@ -22,6 +22,6 @@ private: CCVKGPUBuffer *_gpuBuffer = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandAllocator.cc b/native/cocos/renderer/gfx-vulkan/VKCommandAllocator.cc index 2cf02df346..24d9451a22 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandAllocator.cc +++ b/native/cocos/renderer/gfx-vulkan/VKCommandAllocator.cc @@ -4,7 +4,7 @@ #include "VKCommands.h" #include "VKDevice.h" -NS_CC_BEGIN +namespace cc { CCVKCommandAllocator::CCVKCommandAllocator(GFXDevice *device) : GFXCommandAllocator(device) { @@ -38,4 +38,4 @@ void CCVKCommandAllocator::reset() { } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandAllocator.h b/native/cocos/renderer/gfx-vulkan/VKCommandAllocator.h index de714cbfc4..55f2fa6b04 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandAllocator.h +++ b/native/cocos/renderer/gfx-vulkan/VKCommandAllocator.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_COMMAND_ALLOCATOR_H_ #define CC_GFXVULKAN_CCVK_COMMAND_ALLOCATOR_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUCommandPool; @@ -21,6 +21,6 @@ private: CCVKGPUCommandPool *_gpuCommandPool; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cc b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cc index 8ed14d809c..223fac1bed 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cc +++ b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cc @@ -11,7 +11,7 @@ #include "VKRenderPass.h" #include "VKTexture.h" -NS_CC_BEGIN +namespace cc { CCVKCommandBuffer::CCVKCommandBuffer(GFXDevice *device) : GFXCommandBuffer(device) { @@ -333,4 +333,4 @@ void CCVKCommandBuffer::copyBufferToTexture(GFXBuffer *src, GFXTexture *dst, GFX } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h index f5760ac1d7..51c3cb17aa 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h +++ b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h @@ -3,7 +3,7 @@ #include "VKCommands.h" -NS_CC_BEGIN +namespace cc { class CC_VULKAN_API CCVKCommandBuffer : public GFXCommandBuffer { public: @@ -56,6 +56,6 @@ private: CCVKStencilCompareMask _curStencilCompareMask; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKCommands.cc b/native/cocos/renderer/gfx-vulkan/VKCommands.cc index 67909947ee..125f409a60 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommands.cc +++ b/native/cocos/renderer/gfx-vulkan/VKCommands.cc @@ -10,7 +10,7 @@ #define BUFFER_OFFSET(idx) (static_cast(0) + (idx)) -NS_CC_BEGIN +namespace cc { void insertVkDynamicStates(vector::type &out, const vector::type &dynamicStates) { for (GFXDynamicState dynamicState : dynamicStates) { @@ -981,4 +981,4 @@ void CCVKCmdFuncCopyBuffersToTexture(CCVKDevice *device, uint8_t *const *buffers endOneTimeCommands(device, &cmdBuff); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKCommands.h b/native/cocos/renderer/gfx-vulkan/VKCommands.h index 5439e70a4e..c575835ded 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommands.h +++ b/native/cocos/renderer/gfx-vulkan/VKCommands.h @@ -3,7 +3,7 @@ #include "VKGPUObjects.h" -NS_CC_BEGIN +namespace cc { class CCVKDevice; @@ -64,6 +64,6 @@ CC_VULKAN_API void CCVKCmdFuncDestroyPipelineState(CCVKDevice *device, CCVKGPUPi CC_VULKAN_API void CCVKCmdFuncCopyBuffersToTexture(CCVKDevice *device, uint8_t *const *buffers, CCVKGPUTexture *gpuTexture, const GFXBufferTextureCopyList ®ions); -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKContext.cc b/native/cocos/renderer/gfx-vulkan/VKContext.cc index f175d5a376..07b7e9e4b1 100644 --- a/native/cocos/renderer/gfx-vulkan/VKContext.cc +++ b/native/cocos/renderer/gfx-vulkan/VKContext.cc @@ -8,7 +8,7 @@ #include "VKUtils.h" -NS_CC_BEGIN +namespace cc { namespace { @@ -495,4 +495,4 @@ void CCVKContext::destroy() { } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKContext.h b/native/cocos/renderer/gfx-vulkan/VKContext.h index c540f303af..11ca1ef33d 100644 --- a/native/cocos/renderer/gfx-vulkan/VKContext.h +++ b/native/cocos/renderer/gfx-vulkan/VKContext.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_CONTEXT_H_ #define CC_GFXVULKAN_CCVK_CONTEXT_H_ -NS_CC_BEGIN +namespace cc { class CCVKDevice; class CCVKGPUDevice; @@ -41,6 +41,6 @@ private: vector::type _extensions; }; -NS_CC_END +} #endif // CC_GFXVULKAN_CCVK_CONTEXT_H_ diff --git a/native/cocos/renderer/gfx-vulkan/VKDevice.cc b/native/cocos/renderer/gfx-vulkan/VKDevice.cc index 4359eb4fb5..188d4e99fc 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDevice.cc +++ b/native/cocos/renderer/gfx-vulkan/VKDevice.cc @@ -23,7 +23,7 @@ CC_DISABLE_WARNINGS() #include "vk_mem_alloc.h" CC_ENABLE_WARNINGS() -NS_CC_BEGIN +namespace cc { CCVKDevice::CCVKDevice() { _minClipZ = 0.0f; @@ -628,4 +628,4 @@ void CCVKDevice::copyBuffersToTexture(const GFXDataArray &buffers, GFXTexture *d CCVKCmdFuncCopyBuffersToTexture(this, buffers.datas.data(), ((CCVKTexture *)dst)->gpuTexture(), regions); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKDevice.h b/native/cocos/renderer/gfx-vulkan/VKDevice.h index 16fba68331..1d0b9262d0 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDevice.h +++ b/native/cocos/renderer/gfx-vulkan/VKDevice.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_DEVICE_H_ #define CC_GFXVULKAN_CCVK_DEVICE_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUContext; class CCVKGPUDevice; @@ -75,6 +75,6 @@ private: std::vector _extensions; }; -NS_CC_END +} #endif // CC_GFXVULKAN_CCVK_DEVICE_H_ diff --git a/native/cocos/renderer/gfx-vulkan/VKFence.cc b/native/cocos/renderer/gfx-vulkan/VKFence.cc index 62ef317a1c..4d3e42d3cd 100644 --- a/native/cocos/renderer/gfx-vulkan/VKFence.cc +++ b/native/cocos/renderer/gfx-vulkan/VKFence.cc @@ -4,7 +4,7 @@ #include "VKFence.h" #include "VKGPUObjects.h" -NS_CC_BEGIN +namespace cc { CCVKFence::CCVKFence(GFXDevice *device) : GFXFence(device) { @@ -45,4 +45,4 @@ void CCVKFence::reset() { VK_CHECK(vkResetFences(((CCVKDevice *)_device)->gpuDevice()->vkDevice, 1, &_gpuFence->vkFence)); } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKFence.h b/native/cocos/renderer/gfx-vulkan/VKFence.h index a8ad09f2ec..ff87d17090 100644 --- a/native/cocos/renderer/gfx-vulkan/VKFence.h +++ b/native/cocos/renderer/gfx-vulkan/VKFence.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_FENCE_H_ #define CC_GFXVULKAN_CCVK_FENCE_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUFence; @@ -22,6 +22,6 @@ private: CCVKGPUFence *_gpuFence = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cc b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cc index 2c9b80eb15..5f25949634 100644 --- a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cc +++ b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cc @@ -6,7 +6,7 @@ #include "VKRenderPass.h" #include "VKTexture.h" -NS_CC_BEGIN +namespace cc { CCVKFramebuffer::CCVKFramebuffer(GFXDevice *device) : GFXFramebuffer(device) { @@ -57,4 +57,4 @@ void CCVKFramebuffer::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.h b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.h index 8c85a49de7..241231ad5e 100644 --- a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.h +++ b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_FRAMEBUFFER_H_ #define CC_GFXVULKAN_CCVK_FRAMEBUFFER_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUFramebuffer; @@ -20,6 +20,6 @@ private: CCVKGPUFramebuffer *_gpuFBO = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h b/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h index 10e901b151..a19cefba27 100644 --- a/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h +++ b/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h @@ -3,7 +3,7 @@ #include "VKUtils.h" -NS_CC_BEGIN +namespace cc { class CCVKGPUContext : public Object { public: @@ -317,6 +317,6 @@ private: vector::type _fences; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKInputAssembler.cc b/native/cocos/renderer/gfx-vulkan/VKInputAssembler.cc index 31f89f3093..e6a8ed5202 100644 --- a/native/cocos/renderer/gfx-vulkan/VKInputAssembler.cc +++ b/native/cocos/renderer/gfx-vulkan/VKInputAssembler.cc @@ -4,7 +4,7 @@ #include "VKCommands.h" #include "VKInputAssembler.h" -NS_CC_BEGIN +namespace cc { CCVKInputAssembler::CCVKInputAssembler(GFXDevice *device) : GFXInputAssembler(device) { @@ -59,4 +59,4 @@ void CCVKInputAssembler::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKInputAssembler.h b/native/cocos/renderer/gfx-vulkan/VKInputAssembler.h index 99c2810ac5..2fca2ad2e9 100644 --- a/native/cocos/renderer/gfx-vulkan/VKInputAssembler.h +++ b/native/cocos/renderer/gfx-vulkan/VKInputAssembler.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_INPUT_ASSEMBLER_H_ #define CC_GFXVULKAN_CCVK_INPUT_ASSEMBLER_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUInputAssembler; @@ -20,6 +20,6 @@ private: CCVKGPUInputAssembler *_gpuInputAssembler = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.cc b/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.cc index 6f0d9b6b37..b836be1f40 100644 --- a/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.cc +++ b/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.cc @@ -4,7 +4,7 @@ #include "VKCommands.h" #include "VKPipelineLayout.h" -NS_CC_BEGIN +namespace cc { CCVKPipelineLayout::CCVKPipelineLayout(GFXDevice *device) : GFXPipelineLayout(device) { @@ -41,4 +41,4 @@ void CCVKPipelineLayout::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.h b/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.h index a2b4d71ebf..6287aa1e59 100644 --- a/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.h +++ b/native/cocos/renderer/gfx-vulkan/VKPipelineLayout.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_PIPELINE_LAYOUT_H_ #define CC_GFXVULKAN_CCVK_PIPELINE_LAYOUT_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUPipelineLayout; @@ -20,6 +20,6 @@ private: CCVKGPUPipelineLayout *_gpuPipelineLayout = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKPipelineState.cc b/native/cocos/renderer/gfx-vulkan/VKPipelineState.cc index 4d639796ca..9ff98c225a 100644 --- a/native/cocos/renderer/gfx-vulkan/VKPipelineState.cc +++ b/native/cocos/renderer/gfx-vulkan/VKPipelineState.cc @@ -6,7 +6,7 @@ #include "VKRenderPass.h" #include "VKShader.h" -NS_CC_BEGIN +namespace cc { CCVKPipelineState::CCVKPipelineState(GFXDevice *device) : GFXPipelineState(device) { @@ -53,4 +53,4 @@ void CCVKPipelineState::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKPipelineState.h b/native/cocos/renderer/gfx-vulkan/VKPipelineState.h index fe0978cab5..43f831ceec 100644 --- a/native/cocos/renderer/gfx-vulkan/VKPipelineState.h +++ b/native/cocos/renderer/gfx-vulkan/VKPipelineState.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_PIPELINE_STATE_H_ #define CC_GFXVULKAN_CCVK_PIPELINE_STATE_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUPipelineState; @@ -20,6 +20,6 @@ private: CCVKGPUPipelineState *_gpuPipelineState = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKQueue.cc b/native/cocos/renderer/gfx-vulkan/VKQueue.cc index 53583d180a..caddd1ae18 100644 --- a/native/cocos/renderer/gfx-vulkan/VKQueue.cc +++ b/native/cocos/renderer/gfx-vulkan/VKQueue.cc @@ -6,7 +6,7 @@ #include "VKFence.h" #include "VKQueue.h" -NS_CC_BEGIN +namespace cc { CCVKQueue::CCVKQueue(GFXDevice *device) : GFXQueue(device) { @@ -65,4 +65,4 @@ void CCVKQueue::submit(const vector::type &cmdBuffs, GFXFenc } } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKQueue.h b/native/cocos/renderer/gfx-vulkan/VKQueue.h index 1f0d90ddde..74e4747c02 100644 --- a/native/cocos/renderer/gfx-vulkan/VKQueue.h +++ b/native/cocos/renderer/gfx-vulkan/VKQueue.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_QUEUE_H_ #define CC_GFXVULKAN_CCVK_QUEUE_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUQueue; @@ -28,6 +28,6 @@ private: uint _numTriangles = 0; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKRenderPass.cc b/native/cocos/renderer/gfx-vulkan/VKRenderPass.cc index a13168db85..d4a3612040 100644 --- a/native/cocos/renderer/gfx-vulkan/VKRenderPass.cc +++ b/native/cocos/renderer/gfx-vulkan/VKRenderPass.cc @@ -3,7 +3,7 @@ #include "VKCommands.h" #include "VKRenderPass.h" -NS_CC_BEGIN +namespace cc { CCVKRenderPass::CCVKRenderPass(GFXDevice *device) : GFXRenderPass(device) { @@ -39,4 +39,4 @@ void CCVKRenderPass::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKRenderPass.h b/native/cocos/renderer/gfx-vulkan/VKRenderPass.h index b217f9e706..d41c64470d 100644 --- a/native/cocos/renderer/gfx-vulkan/VKRenderPass.h +++ b/native/cocos/renderer/gfx-vulkan/VKRenderPass.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_RENDER_PASS_H_ #define CC_GFXVULKAN_CCVK_RENDER_PASS_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPURenderPass; @@ -20,6 +20,6 @@ private: CCVKGPURenderPass *_gpuRenderPass = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKSPIRV.h b/native/cocos/renderer/gfx-vulkan/VKSPIRV.h index 89330255b2..d3af72ed64 100644 --- a/native/cocos/renderer/gfx-vulkan/VKSPIRV.h +++ b/native/cocos/renderer/gfx-vulkan/VKSPIRV.h @@ -4,7 +4,7 @@ #include "SPIRV/GlslangToSpv.h" #include "glslang/Public/ShaderLang.h" -NS_CC_BEGIN +namespace cc { namespace { EShLanguage getShaderStage(GFXShaderType type) { @@ -197,4 +197,4 @@ const vector::type GLSL2SPIRV(GFXShaderType type, const String &so #endif -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKSampler.cc b/native/cocos/renderer/gfx-vulkan/VKSampler.cc index 8f5e3b9e11..a0cab358aa 100644 --- a/native/cocos/renderer/gfx-vulkan/VKSampler.cc +++ b/native/cocos/renderer/gfx-vulkan/VKSampler.cc @@ -3,7 +3,7 @@ #include "VKCommands.h" #include "VKSampler.h" -NS_CC_BEGIN +namespace cc { CCVKSampler::CCVKSampler(GFXDevice *device) : GFXSampler(device) { @@ -57,4 +57,4 @@ void CCVKSampler::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKSampler.h b/native/cocos/renderer/gfx-vulkan/VKSampler.h index 18811371fa..a4b32a68eb 100644 --- a/native/cocos/renderer/gfx-vulkan/VKSampler.h +++ b/native/cocos/renderer/gfx-vulkan/VKSampler.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_SAMPLER_H_ #define CC_GFXVULKAN_CCVK_SAMPLER_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUSampler; @@ -20,6 +20,6 @@ private: CCVKGPUSampler *_gpuSampler = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKShader.cc b/native/cocos/renderer/gfx-vulkan/VKShader.cc index 4bb64d0eb2..7e28a5d1bf 100644 --- a/native/cocos/renderer/gfx-vulkan/VKShader.cc +++ b/native/cocos/renderer/gfx-vulkan/VKShader.cc @@ -3,7 +3,7 @@ #include "VKCommands.h" #include "VKShader.h" -NS_CC_BEGIN +namespace cc { CCVKShader::CCVKShader(GFXDevice *device) : GFXShader(device) { @@ -45,4 +45,4 @@ void CCVKShader::destroy() { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKShader.h b/native/cocos/renderer/gfx-vulkan/VKShader.h index c37f09e7c3..cf1dc08184 100644 --- a/native/cocos/renderer/gfx-vulkan/VKShader.h +++ b/native/cocos/renderer/gfx-vulkan/VKShader.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_SHADER_H_ #define CC_GFXVULKAN_CCVK_SHADER_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUShader; @@ -20,6 +20,6 @@ private: CCVKGPUShader *_gpuShader = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKTexture.cc b/native/cocos/renderer/gfx-vulkan/VKTexture.cc index aadfd693d9..8a968b4c8a 100644 --- a/native/cocos/renderer/gfx-vulkan/VKTexture.cc +++ b/native/cocos/renderer/gfx-vulkan/VKTexture.cc @@ -3,7 +3,7 @@ #include "VKCommands.h" #include "VKTexture.h" -NS_CC_BEGIN +namespace cc { CCVKTexture::CCVKTexture(GFXDevice *device) : GFXTexture(device) { @@ -167,4 +167,4 @@ void CCVKTexture::resize(uint width, uint height) { _status = GFXStatus::UNREADY; } -NS_CC_END +} diff --git a/native/cocos/renderer/gfx-vulkan/VKTexture.h b/native/cocos/renderer/gfx-vulkan/VKTexture.h index 1de6bb61d1..93cab62ff0 100644 --- a/native/cocos/renderer/gfx-vulkan/VKTexture.h +++ b/native/cocos/renderer/gfx-vulkan/VKTexture.h @@ -1,7 +1,7 @@ #ifndef CC_GFXVULKAN_CCVK_TEXTURE_H_ #define CC_GFXVULKAN_CCVK_TEXTURE_H_ -NS_CC_BEGIN +namespace cc { class CCVKGPUTexture; class CCVKGPUTextureView; @@ -27,6 +27,6 @@ private: CCVKGPUTextureView *_gpuTextureView = nullptr; }; -NS_CC_END +} #endif diff --git a/native/cocos/renderer/gfx-vulkan/VKUtils.h b/native/cocos/renderer/gfx-vulkan/VKUtils.h index 5ece404aa8..13a73c1457 100644 --- a/native/cocos/renderer/gfx-vulkan/VKUtils.h +++ b/native/cocos/renderer/gfx-vulkan/VKUtils.h @@ -8,7 +8,7 @@ #define DEFAULT_FENCE_TIMEOUT 100000000000 -NS_CC_BEGIN +namespace cc { namespace { VkFormat MapVkFormat(GFXFormat format) { @@ -340,8 +340,8 @@ uint selectMemoryType(const VkPhysicalDeviceMemoryProperties &memoryProperties, VkImageCreateFlags MapVkImageCreateFlags(GFXTextureType type) { uint res = 0u; switch (type) { - case cocos2d::GFXTextureType::CUBE: res |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; break; - case cocos2d::GFXTextureType::TEX2D_ARRAY: res |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT; break; + case cc::GFXTextureType::CUBE: res |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; break; + case cc::GFXTextureType::TEX2D_ARRAY: res |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT; break; } return (VkImageCreateFlags)res; } @@ -374,9 +374,9 @@ VkCommandBufferLevel MapVkCommandBufferLevel(GFXCommandBufferType type) { VkDescriptorType MapVkDescriptorType(GFXBindingType type) { switch (type) { - case cocos2d::GFXBindingType::UNIFORM_BUFFER: return VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - case cocos2d::GFXBindingType::SAMPLER: return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; - case cocos2d::GFXBindingType::STORAGE_BUFFER: return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; + case cc::GFXBindingType::UNIFORM_BUFFER: return VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + case cc::GFXBindingType::SAMPLER: return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + case cc::GFXBindingType::STORAGE_BUFFER: return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; default: { CCASSERT(false, "Unsupported GFXBindingType, convert to VkDescriptorType failed."); return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; @@ -642,6 +642,6 @@ bool findSupportedFormat(std::pair format, VkImageTiling ti } } // namespace -NS_CC_END +} #endif // CC_GFXVULKAN_CCVK_UTILS_H_ diff --git a/native/cocos/renderer/pipeline/BatchedBuffer.h b/native/cocos/renderer/pipeline/BatchedBuffer.h index 76337ca343..47c6f16ec0 100644 --- a/native/cocos/renderer/pipeline/BatchedBuffer.h +++ b/native/cocos/renderer/pipeline/BatchedBuffer.h @@ -2,30 +2,30 @@ #include "Define.h" -NS_CC_BEGIN +namespace cc { class Pass; class SubModel; -NS_CC_END +} NS_PP_BEGIN -class CC_DLL BatchedBuffer : public cocos2d::Object { +class CC_DLL BatchedBuffer : public cc::Object { public: - BatchedBuffer(cocos2d::Pass *pass); + BatchedBuffer(cc::Pass *pass); ~BatchedBuffer() = default; void destroy(); - void merge(cocos2d::SubModel *, uint passIdx, RenderObject *); + void merge(cc::SubModel *, uint passIdx, RenderObject *); void clear(); void clearUBO(); CC_INLINE const BatchedItemList &getBaches() const { return _batchedItems; } - CC_INLINE cocos2d::Pass *getPass() const { return _pass; } + CC_INLINE cc::Pass *getPass() const { return _pass; } private: // const _localBatched = new UBOLocalBatched(); BatchedItemList _batchedItems; - cocos2d::Pass *_pass = nullptr; + cc::Pass *_pass = nullptr; }; NS_PP_END diff --git a/native/cocos/renderer/pipeline/Define.h b/native/cocos/renderer/pipeline/Define.h index b8e6cffa20..bdab3bfef8 100644 --- a/native/cocos/renderer/pipeline/Define.h +++ b/native/cocos/renderer/pipeline/Define.h @@ -2,9 +2,9 @@ #include "core/CoreStd.h" -NS_CC_BEGIN +namespace cc { class PSOCreateInfo; -NS_CC_END +} NS_PP_BEGIN @@ -14,16 +14,16 @@ class RenderFlow; struct CC_DLL RenderObject { //TODO }; -typedef cocos2d::vector::type RenderObjectList; +typedef cc::vector::type RenderObjectList; struct CC_DLL RenderPipelineInfo { //TODO }; struct CC_DLL RenderStageInfo { - cocos2d::String name; + cc::String name; int priority = 0; - cocos2d::String framebuffer; + cc::String framebuffer; // renderQueues?: RenderQueueDesc[]; }; @@ -41,29 +41,29 @@ struct CC_DLL RenderTargetInfo { }; struct CC_DLL InstancedItem { - cocos2d::GFXBuffer *vb = nullptr; + cc::GFXBuffer *vb = nullptr; uint8_t *data = nullptr; - cocos2d::GFXInputAssembler *ia = nullptr; + cc::GFXInputAssembler *ia = nullptr; uint count = 0; uint capacity = 0; uint stride = 0; }; -typedef cocos2d::vector::type InstancedItemList; +typedef cc::vector::type InstancedItemList; struct BatchedItem { - cocos2d::GFXBufferList vbs; + cc::GFXBufferList vbs; uint8_t *vbDatas = nullptr; - cocos2d::GFXBuffer *vbIdx = nullptr; + cc::GFXBuffer *vbIdx = nullptr; float *vbIdxData = nullptr; uint mergCount = 0; - cocos2d::GFXInputAssembler *ia = nullptr; - cocos2d::GFXBuffer *ubo = nullptr; - cocos2d::PSOCreateInfo *psoCreatedInfo = nullptr; + cc::GFXInputAssembler *ia = nullptr; + cc::GFXBuffer *ubo = nullptr; + cc::PSOCreateInfo *psoCreatedInfo = nullptr; }; -typedef cocos2d::vector::type BatchedItemList; +typedef cc::vector::type BatchedItemList; -typedef cocos2d::vector::type RenderStageList; -typedef cocos2d::vector::type RenderFlowList; +typedef cc::vector::type RenderStageList; +typedef cc::vector::type RenderFlowList; //TODO const uint CAMERA_DEFAULT_MASK = 1; diff --git a/native/cocos/renderer/pipeline/InstancedBuffer.h b/native/cocos/renderer/pipeline/InstancedBuffer.h index 62fc600791..ec47d04f76 100644 --- a/native/cocos/renderer/pipeline/InstancedBuffer.h +++ b/native/cocos/renderer/pipeline/InstancedBuffer.h @@ -2,36 +2,36 @@ #include "Define.h" -NS_CC_BEGIN +namespace cc { class Pass; struct InstancedAttributeBlock; struct PSOCreateInfo; class SubModel; -NS_CC_END +} NS_PP_BEGIN -class InstancedBuffer : public cocos2d::Object { +class InstancedBuffer : public cc::Object { public: static const uint INITIAL_CAPACITY = 32; static const uint MAX_CAPACITY = 1024; - InstancedBuffer(cocos2d::Pass *pass); + InstancedBuffer(cc::Pass *pass); ~InstancedBuffer() = default; void destroy(); - void merge(cocos2d::SubModel *, const cocos2d::InstancedAttributeBlock &, const cocos2d::PSOCreateInfo &); + void merge(cc::SubModel *, const cc::InstancedAttributeBlock &, const cc::PSOCreateInfo &); void uploadBuffers(); void clear(); CC_INLINE const InstancedItemList &getInstances() const { return _instancedItems; } - // CC_INLINE const cocos2d::PSOCreateInfo &getPSOCreateInfo() const { return _PSOCreateInfo; } - CC_INLINE cocos2d::Pass *getPass() const { return _pass; } + // CC_INLINE const cc::PSOCreateInfo &getPSOCreateInfo() const { return _PSOCreateInfo; } + CC_INLINE cc::Pass *getPass() const { return _pass; } private: InstancedItemList _instancedItems; - // cocos2d::PSOCreateInfo _PSOCreateInfo; - cocos2d::Pass *_pass = nullptr; + // cc::PSOCreateInfo _PSOCreateInfo; + cc::Pass *_pass = nullptr; }; NS_PP_END diff --git a/native/cocos/renderer/pipeline/RenderBatchedQueue.h b/native/cocos/renderer/pipeline/RenderBatchedQueue.h index a73698a088..0e5cfddbf5 100644 --- a/native/cocos/renderer/pipeline/RenderBatchedQueue.h +++ b/native/cocos/renderer/pipeline/RenderBatchedQueue.h @@ -6,18 +6,18 @@ NS_PP_BEGIN class BatchedBuffer; -class CC_DLL RenderBatchedQueue : public cocos2d::Object { +class CC_DLL RenderBatchedQueue : public cc::Object { public: RenderBatchedQueue() = default; ~RenderBatchedQueue() = default; void clear(); - void recordCommandBuffer(cocos2d::GFXDevice *, cocos2d::GFXRenderPass *, cocos2d::GFXCommandBuffer *); + void recordCommandBuffer(cc::GFXDevice *, cc::GFXRenderPass *, cc::GFXCommandBuffer *); - CC_INLINE const cocos2d::set::type &getQueue() const { return _queue; } + CC_INLINE const cc::set::type &getQueue() const { return _queue; } private: - cocos2d::set::type _queue; + cc::set::type _queue; }; NS_PP_END diff --git a/native/cocos/renderer/pipeline/RenderFlow.h b/native/cocos/renderer/pipeline/RenderFlow.h index 600ac9f33f..0201c64261 100644 --- a/native/cocos/renderer/pipeline/RenderFlow.h +++ b/native/cocos/renderer/pipeline/RenderFlow.h @@ -2,11 +2,11 @@ #include "Define.h" -NS_CC_BEGIN +namespace cc { class GFXDevice; -NS_CC_END +} NS_PP_BEGIN @@ -14,7 +14,7 @@ class RenderPipeline; class RenderStage; class RenderView; -class CC_DLL RenderFlow : public cocos2d::Object { +class CC_DLL RenderFlow : public cc::Object { public: RenderFlow() = default; virtual ~RenderFlow() = default; @@ -29,9 +29,9 @@ public: void destroyStages(); - CC_INLINE const cocos2d::GFXDevice *getDevice() const { return _device; } + CC_INLINE const cc::GFXDevice *getDevice() const { return _device; } CC_INLINE const RenderPipeline *getPipeline() const { return _pipeline; } - CC_INLINE const cocos2d::String &getName() const { return _name; } + CC_INLINE const cc::String &getName() const { return _name; } CC_INLINE int getPriority() const { return _priority; } CC_INLINE const RenderStageList &getStages() const { return _stages; } // CC_INLINE const Material *getMaterial() const { return _material; } @@ -41,9 +41,9 @@ protected: void activateStages(); protected: - cocos2d::GFXDevice *_device = nullptr; + cc::GFXDevice *_device = nullptr; RenderPipeline *_pipeline = nullptr; - cocos2d::String _name; + cc::String _name; int _priority = 0; RenderStageList _stages; // Material *_material = nullptr; diff --git a/native/cocos/renderer/pipeline/RenderInstancedQueue.h b/native/cocos/renderer/pipeline/RenderInstancedQueue.h index e51cacdee7..e47a80e001 100644 --- a/native/cocos/renderer/pipeline/RenderInstancedQueue.h +++ b/native/cocos/renderer/pipeline/RenderInstancedQueue.h @@ -6,18 +6,18 @@ NS_PP_BEGIN class InstancedBuffer; -class CC_DLL RenderInstancedQueue : public cocos2d::Object { +class CC_DLL RenderInstancedQueue : public cc::Object { public: RenderInstancedQueue() = default; ~RenderInstancedQueue() = default; void clear(); - void recordCommandBuffer(cocos2d::GFXDevice *, cocos2d::GFXRenderPass *, cocos2d::GFXCommandBuffer *); + void recordCommandBuffer(cc::GFXDevice *, cc::GFXRenderPass *, cc::GFXCommandBuffer *); - CC_INLINE const cocos2d::set::type &getQueue() const { return _queue; } + CC_INLINE const cc::set::type &getQueue() const { return _queue; } private: - cocos2d::set::type _queue; + cc::set::type _queue; }; NS_PP_END diff --git a/native/cocos/renderer/pipeline/RenderPipeline.h b/native/cocos/renderer/pipeline/RenderPipeline.h index a09965b420..5be85b72b7 100644 --- a/native/cocos/renderer/pipeline/RenderPipeline.h +++ b/native/cocos/renderer/pipeline/RenderPipeline.h @@ -3,7 +3,7 @@ #include "core/CoreStd.h" #include "Define.h" -NS_CC_BEGIN +namespace cc { class GFXDevice; class GFXInputAssembler; class GFXTexture; @@ -13,24 +13,24 @@ class Light; class Root; class Model; class Camera; -NS_CC_END +} NS_PP_BEGIN class RenderView; -class CC_DLL RenderPipeline : public cocos2d::Object { +class CC_DLL RenderPipeline : public cc::Object { public: virtual ~RenderPipeline() = default; virtual void destroy() = 0; - virtual cocos2d::vector::type &getValidLights() const = 0; - virtual cocos2d::vector::type &getLightIndexOffsets() const = 0; - virtual cocos2d::vector::type &getLightIndices() const = 0; - virtual cocos2d::vector::type &getLightBuffers() const = 0; + virtual cc::vector::type &getValidLights() const = 0; + virtual cc::vector::type &getLightIndexOffsets() const = 0; + virtual cc::vector::type &getLightIndices() const = 0; + virtual cc::vector::type &getLightBuffers() const = 0; virtual bool initialize(const RenderPipelineInfo &info); - virtual bool activate(cocos2d::Root *root); + virtual bool activate(cc::Root *root); virtual void render(RenderView *view); virtual void rebuild(); virtual void resize(uint width, uint height); @@ -38,21 +38,21 @@ public: virtual void sceneCulling(); void swapFBOS(); - void addRenderPass(uint stage, cocos2d::GFXRenderPass *renderPass); - cocos2d::GFXRenderPass *getRenderPass(uint stage) const; + void addRenderPass(uint stage, cc::GFXRenderPass *renderPass); + cc::GFXRenderPass *getRenderPass(uint stage) const; void removeRenderPass(uint stage); void clearRenderPasses(); void destroyFlows(); - RenderFlow *getFlow(const cocos2d::String &name) const; + RenderFlow *getFlow(const cc::String &name) const; void updateMacros(); - cocos2d::GFXTexture *getTexture(const cocos2d::String &name) const; - cocos2d::GFXTexture *getRenderTexture(const cocos2d::String &name) const; - cocos2d::GFXBuffer *getFrameBuffer(const cocos2d::String &name) const; + cc::GFXTexture *getTexture(const cc::String &name) const; + cc::GFXTexture *getRenderTexture(const cc::String &name) const; + cc::GFXBuffer *getFrameBuffer(const cc::String &name) const; // CC_INLINE const Root* getRoot() const { } - CC_INLINE cocos2d::GFXDevice *getDevice() const { return _device; } - CC_INLINE cocos2d::GFXTexture *getDefaultTexture() const { return _defaultTexture; } - CC_INLINE cocos2d::GFXInputAssembler *getQuadIA() const { return _quadIA; } + CC_INLINE cc::GFXDevice *getDevice() const { return _device; } + CC_INLINE cc::GFXTexture *getDefaultTexture() const { return _defaultTexture; } + CC_INLINE cc::GFXInputAssembler *getQuadIA() const { return _quadIA; } CC_INLINE const RenderFlowList &getFlows() const { return _flows; } CC_INLINE const RenderFlowList &getActiveFlows() const { return _activeFlows; } CC_INLINE const RenderObjectList &getRenderObjects() const { return _renderObjects; } @@ -60,9 +60,9 @@ public: CC_INLINE float getFpScaleInv() const { return _fpScaleInv; } CC_INLINE float getShadingScale() const { return _shadingScale; } CC_INLINE float getLightMeterScale() const { return _lightMeterScale; } - CC_INLINE const cocos2d::String &getCurrentShading() const { return _currIdx; } - CC_INLINE const cocos2d::String &getPreviousShading() const { return _prevIdx; } - CC_INLINE const cocos2d::String &getName() const { return _name; } + CC_INLINE const cc::String &getCurrentShading() const { return _currIdx; } + CC_INLINE const cc::String &getPreviousShading() const { return _prevIdx; } + CC_INLINE const cc::String &getName() const { return _name; } CC_INLINE bool isHDRSupported() const { return _isHDRSupported; } CC_INLINE bool isUsePostProcess() const { return _isUsePostProcess; } CC_INLINE bool isHDR() const { return _isHDR; } @@ -80,22 +80,22 @@ protected: void destroyQuadInputAssembler(); bool createUBOs(); void destroyUBOs(); - void addVisibleModel(cocos2d::Model *model, cocos2d::Camera *camera); + void addVisibleModel(cc::Model *model, cc::Camera *camera); private: void activateFlow(RenderFlow *flow); - cocos2d::GFXFormat getTextureFormat(cocos2d::GFXFormat format, cocos2d::GFXTextureUsageBit usage) const; + cc::GFXFormat getTextureFormat(cc::GFXFormat format, cc::GFXTextureUsageBit usage) const; protected: - cocos2d::String _name; - cocos2d::String _currIdx = "shading"; - cocos2d::String _prevIdx = "shading1"; + cc::String _name; + cc::String _currIdx = "shading"; + cc::String _prevIdx = "shading1"; RenderObjectList _renderObjects; RenderFlowList _flows; RenderFlowList _activeFlows; - cocos2d::GFXDevice *_device = nullptr; - cocos2d::GFXInputAssembler *_quadIA = nullptr; - cocos2d::GFXTexture *_defaultTexture = nullptr; + cc::GFXDevice *_device = nullptr; + cc::GFXInputAssembler *_quadIA = nullptr; + cc::GFXTexture *_defaultTexture = nullptr; float _shadingScale = 1.f; float _lightMeterScale = 1000.f; float _fpScale = 1.f / 1024; diff --git a/native/cocos/renderer/pipeline/RenderStage.h b/native/cocos/renderer/pipeline/RenderStage.h index 285a5ce3e3..1a14bc8310 100644 --- a/native/cocos/renderer/pipeline/RenderStage.h +++ b/native/cocos/renderer/pipeline/RenderStage.h @@ -2,9 +2,9 @@ #include "Define.h" -NS_CC_BEGIN +namespace cc { class GFXFramebuffer; -NS_CC_END +} NS_PP_BEGIN @@ -12,7 +12,7 @@ class RenderFlow; class RenderPipeline; class RenderView; -class CC_DLL RenderStage : public cocos2d::Object { +class CC_DLL RenderStage : public cc::Object { public: RenderStage() = default; virtual ~RenderStage() = default; @@ -37,12 +37,12 @@ public: CC_INLINE RenderFlow *getFlow() const { return _flow; } CC_INLINE RenderPipeline *getPipeline() const { return _pipeline; } CC_INLINE int getPriority() const { return _priority; } - CC_INLINE cocos2d::GFXFramebuffer *getFrameBuffer() const { return _frameBuffer; } + CC_INLINE cc::GFXFramebuffer *getFrameBuffer() const { return _frameBuffer; } protected: RenderFlow *_flow = nullptr; RenderPipeline *_pipeline = nullptr; - cocos2d::GFXFramebuffer *_frameBuffer = nullptr; + cc::GFXFramebuffer *_frameBuffer = nullptr; int _priority = 0; }; diff --git a/native/cocos/renderer/pipeline/RenderView.h b/native/cocos/renderer/pipeline/RenderView.h index 6330eb1923..efcfa0762d 100644 --- a/native/cocos/renderer/pipeline/RenderView.h +++ b/native/cocos/renderer/pipeline/RenderView.h @@ -2,18 +2,18 @@ #include "Define.h" -NS_CC_BEGIN +namespace cc { class Camera; class Root; -NS_CC_END +} NS_PP_BEGIN class RenderFlow; -class CC_DLL RenderView : public cocos2d::Object { +class CC_DLL RenderView : public cc::Object { public: - static void registerCreateFun(cocos2d::Root *root); + static void registerCreateFun(cc::Root *root); bool initialize(const RenderViewInfo &info); void destroy(); @@ -21,11 +21,11 @@ public: void setExecuteFlows(const RenderFlowList &flows); void setPriority(); - CC_INLINE const cocos2d::String &getName() const { return _name; } + CC_INLINE const cc::String &getName() const { return _name; } CC_INLINE uint getPriority() const { return _priority; } CC_INLINE uint getVisibility() const { return _visibility; } CC_INLINE void setVisibility(uint value) { _visibility = value; } - CC_INLINE cocos2d::Camera *getCamera() const { return _camera; } + CC_INLINE cc::Camera *getCamera() const { return _camera; } CC_INLINE bool isEnabled() const { return _isEnabled; } CC_INLINE const RenderFlowList &getFlows() const { return _flows; } @@ -33,13 +33,13 @@ public: // setWindow private: - RenderView(cocos2d::Root *root, cocos2d::Camera *camera); + RenderView(cc::Root *root, cc::Camera *camera); private: RenderFlowList _flows; - cocos2d::String _name; - cocos2d::Camera *_camera = nullptr; - cocos2d::Root *_root = nullptr; + cc::String _name; + cc::Camera *_camera = nullptr; + cc::Root *_root = nullptr; uint _priority = 0; uint _visibility = CAMERA_DEFAULT_MASK; bool _isEnabled = false; diff --git a/native/cocos/renderer/pipeline/forward/ForwardPipeline.h b/native/cocos/renderer/pipeline/forward/ForwardPipeline.h index 41de3c108d..63dc0b9b94 100644 --- a/native/cocos/renderer/pipeline/forward/ForwardPipeline.h +++ b/native/cocos/renderer/pipeline/forward/ForwardPipeline.h @@ -11,21 +11,21 @@ public: virtual bool initialize(const RenderPipelineInfo &info) override; virtual void destroy() override; - virtual bool activate(cocos2d::Root *root) override; + virtual bool activate(cc::Root *root) override; virtual void rebuild() override; virtual void updateUBOs(RenderView *view) override; virtual void sceneCulling() override; - virtual cocos2d::vector::type &getLightIndices() const override; - virtual cocos2d::vector::type &getLightIndexOffsets() const override; - virtual cocos2d::vector::type &getLightBuffers() const override; + virtual cc::vector::type &getLightIndices() const override; + virtual cc::vector::type &getLightIndexOffsets() const override; + virtual cc::vector::type &getLightBuffers() const override; - CC_INLINE cocos2d::GFXBuffer *getLightsUBO() { return _lightsUBO; } + CC_INLINE cc::GFXBuffer *getLightsUBO() { return _lightsUBO; } private: - void cullLightPerModel(cocos2d::Model *model); + void cullLightPerModel(cc::Model *model); private: - cocos2d::GFXBuffer *_lightsUBO = nullptr; + cc::GFXBuffer *_lightsUBO = nullptr; }; NS_PP_END diff --git a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.cpp index d101f993a6..1cc75535e8 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.cpp @@ -11,12 +11,12 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_AudioProfile_proto = nullptr; -se::Class* __jsb_cocos2d_AudioProfile_class = nullptr; +se::Object* __jsb_cc_AudioProfile_proto = nullptr; +se::Class* __jsb_cc_AudioProfile_class = nullptr; static bool js_audioengine_AudioProfile_get_name(se::State& s) { - cocos2d::AudioProfile* cobj = (cocos2d::AudioProfile*)s.nativeThisObject(); + cc::AudioProfile* cobj = (cc::AudioProfile*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_audioengine_AudioProfile_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -30,7 +30,7 @@ SE_BIND_PROP_GET(js_audioengine_AudioProfile_get_name) static bool js_audioengine_AudioProfile_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::AudioProfile* cobj = (cocos2d::AudioProfile*)s.nativeThisObject(); + cc::AudioProfile* cobj = (cc::AudioProfile*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_audioengine_AudioProfile_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -44,7 +44,7 @@ SE_BIND_PROP_SET(js_audioengine_AudioProfile_set_name) static bool js_audioengine_AudioProfile_get_maxInstances(se::State& s) { - cocos2d::AudioProfile* cobj = (cocos2d::AudioProfile*)s.nativeThisObject(); + cc::AudioProfile* cobj = (cc::AudioProfile*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_audioengine_AudioProfile_get_maxInstances : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -58,7 +58,7 @@ SE_BIND_PROP_GET(js_audioengine_AudioProfile_get_maxInstances) static bool js_audioengine_AudioProfile_set_maxInstances(se::State& s) { const auto& args = s.args(); - cocos2d::AudioProfile* cobj = (cocos2d::AudioProfile*)s.nativeThisObject(); + cc::AudioProfile* cobj = (cc::AudioProfile*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_audioengine_AudioProfile_set_maxInstances : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -72,7 +72,7 @@ SE_BIND_PROP_SET(js_audioengine_AudioProfile_set_maxInstances) static bool js_audioengine_AudioProfile_get_minDelay(se::State& s) { - cocos2d::AudioProfile* cobj = (cocos2d::AudioProfile*)s.nativeThisObject(); + cc::AudioProfile* cobj = (cc::AudioProfile*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_audioengine_AudioProfile_get_minDelay : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -86,7 +86,7 @@ SE_BIND_PROP_GET(js_audioengine_AudioProfile_get_minDelay) static bool js_audioengine_AudioProfile_set_minDelay(se::State& s) { const auto& args = s.args(); - cocos2d::AudioProfile* cobj = (cocos2d::AudioProfile*)s.nativeThisObject(); + cc::AudioProfile* cobj = (cc::AudioProfile*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_audioengine_AudioProfile_set_minDelay : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -98,33 +98,33 @@ static bool js_audioengine_AudioProfile_set_minDelay(se::State& s) } SE_BIND_PROP_SET(js_audioengine_AudioProfile_set_minDelay) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_AudioProfile_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_AudioProfile_finalize) static bool js_audioengine_AudioProfile_constructor(se::State& s) { - cocos2d::AudioProfile* cobj = JSB_ALLOC(cocos2d::AudioProfile); + cc::AudioProfile* cobj = JSB_ALLOC(cc::AudioProfile); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } -SE_BIND_CTOR(js_audioengine_AudioProfile_constructor, __jsb_cocos2d_AudioProfile_class, js_cocos2d_AudioProfile_finalize) +SE_BIND_CTOR(js_audioengine_AudioProfile_constructor, __jsb_cc_AudioProfile_class, js_cc_AudioProfile_finalize) -static bool js_cocos2d_AudioProfile_finalize(se::State& s) +static bool js_cc_AudioProfile_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::AudioProfile)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::AudioProfile)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::AudioProfile* cobj = (cocos2d::AudioProfile*)s.nativeThisObject(); + cc::AudioProfile* cobj = (cc::AudioProfile*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_AudioProfile_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_AudioProfile_finalize) bool js_register_audioengine_AudioProfile(se::Object* obj) { @@ -133,19 +133,19 @@ bool js_register_audioengine_AudioProfile(se::Object* obj) cls->defineProperty("name", _SE(js_audioengine_AudioProfile_get_name), _SE(js_audioengine_AudioProfile_set_name)); cls->defineProperty("maxInstances", _SE(js_audioengine_AudioProfile_get_maxInstances), _SE(js_audioengine_AudioProfile_set_maxInstances)); cls->defineProperty("minDelay", _SE(js_audioengine_AudioProfile_get_minDelay), _SE(js_audioengine_AudioProfile_set_minDelay)); - cls->defineFinalizeFunction(_SE(js_cocos2d_AudioProfile_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_AudioProfile_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_AudioProfile_proto = cls->getProto(); - __jsb_cocos2d_AudioProfile_class = cls; + __jsb_cc_AudioProfile_proto = cls->getProto(); + __jsb_cc_AudioProfile_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_AudioEngine_proto = nullptr; -se::Class* __jsb_cocos2d_AudioEngine_class = nullptr; +se::Object* __jsb_cc_AudioEngine_proto = nullptr; +se::Class* __jsb_cc_AudioEngine_class = nullptr; static bool js_audioengine_AudioEngine_lazyInit(se::State& s) { @@ -153,7 +153,7 @@ static bool js_audioengine_AudioEngine_lazyInit(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - bool result = cocos2d::AudioEngine::lazyInit(); + bool result = cc::AudioEngine::lazyInit(); ok &= boolean_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_lazyInit : Error processing arguments"); return true; @@ -174,7 +174,7 @@ static bool js_audioengine_AudioEngine_setCurrentTime(se::State& s) do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); ok &= seval_to_float(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_setCurrentTime : Error processing arguments"); - bool result = cocos2d::AudioEngine::setCurrentTime(arg0, arg1); + bool result = cc::AudioEngine::setCurrentTime(arg0, arg1); ok &= boolean_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_setCurrentTime : Error processing arguments"); return true; @@ -193,7 +193,7 @@ static bool js_audioengine_AudioEngine_getVolume(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getVolume : Error processing arguments"); - float result = cocos2d::AudioEngine::getVolume(arg0); + float result = cc::AudioEngine::getVolume(arg0); ok &= float_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getVolume : Error processing arguments"); return true; @@ -212,7 +212,7 @@ static bool js_audioengine_AudioEngine_uncache(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_uncache : Error processing arguments"); - cocos2d::AudioEngine::uncache(arg0); + cc::AudioEngine::uncache(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -225,7 +225,7 @@ static bool js_audioengine_AudioEngine_resumeAll(se::State& s) const auto& args = s.args(); size_t argc = args.size(); if (argc == 0) { - cocos2d::AudioEngine::resumeAll(); + cc::AudioEngine::resumeAll(); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -238,7 +238,7 @@ static bool js_audioengine_AudioEngine_stopAll(se::State& s) const auto& args = s.args(); size_t argc = args.size(); if (argc == 0) { - cocos2d::AudioEngine::stopAll(); + cc::AudioEngine::stopAll(); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -255,7 +255,7 @@ static bool js_audioengine_AudioEngine_pause(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_pause : Error processing arguments"); - cocos2d::AudioEngine::pause(arg0); + cc::AudioEngine::pause(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -268,7 +268,7 @@ static bool js_audioengine_AudioEngine_end(se::State& s) const auto& args = s.args(); size_t argc = args.size(); if (argc == 0) { - cocos2d::AudioEngine::end(); + cc::AudioEngine::end(); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -282,7 +282,7 @@ static bool js_audioengine_AudioEngine_getMaxAudioInstance(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - int result = cocos2d::AudioEngine::getMaxAudioInstance(); + int result = cc::AudioEngine::getMaxAudioInstance(); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getMaxAudioInstance : Error processing arguments"); return true; @@ -298,7 +298,7 @@ static bool js_audioengine_AudioEngine_isEnabled(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - bool result = cocos2d::AudioEngine::isEnabled(); + bool result = cc::AudioEngine::isEnabled(); ok &= boolean_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_isEnabled : Error processing arguments"); return true; @@ -317,7 +317,7 @@ static bool js_audioengine_AudioEngine_getDurationFromFile(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getDurationFromFile : Error processing arguments"); - float result = cocos2d::AudioEngine::getDurationFromFile(arg0); + float result = cc::AudioEngine::getDurationFromFile(arg0); ok &= float_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getDurationFromFile : Error processing arguments"); return true; @@ -336,7 +336,7 @@ static bool js_audioengine_AudioEngine_getCurrentTime(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getCurrentTime : Error processing arguments"); - float result = cocos2d::AudioEngine::getCurrentTime(arg0); + float result = cc::AudioEngine::getCurrentTime(arg0); ok &= float_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getCurrentTime : Error processing arguments"); return true; @@ -355,7 +355,7 @@ static bool js_audioengine_AudioEngine_setMaxAudioInstance(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_setMaxAudioInstance : Error processing arguments"); - bool result = cocos2d::AudioEngine::setMaxAudioInstance(arg0); + bool result = cc::AudioEngine::setMaxAudioInstance(arg0); ok &= boolean_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_setMaxAudioInstance : Error processing arguments"); return true; @@ -374,7 +374,7 @@ static bool js_audioengine_AudioEngine_isLoop(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_isLoop : Error processing arguments"); - bool result = cocos2d::AudioEngine::isLoop(arg0); + bool result = cc::AudioEngine::isLoop(arg0); ok &= boolean_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_isLoop : Error processing arguments"); return true; @@ -389,7 +389,7 @@ static bool js_audioengine_AudioEngine_pauseAll(se::State& s) const auto& args = s.args(); size_t argc = args.size(); if (argc == 0) { - cocos2d::AudioEngine::pauseAll(); + cc::AudioEngine::pauseAll(); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -402,7 +402,7 @@ static bool js_audioengine_AudioEngine_uncacheAll(se::State& s) const auto& args = s.args(); size_t argc = args.size(); if (argc == 0) { - cocos2d::AudioEngine::uncacheAll(); + cc::AudioEngine::uncacheAll(); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -421,7 +421,7 @@ static bool js_audioengine_AudioEngine_setVolume(se::State& s) do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); ok &= seval_to_float(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_setVolume : Error processing arguments"); - cocos2d::AudioEngine::setVolume(arg0, arg1); + cc::AudioEngine::setVolume(arg0, arg1); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2); @@ -471,7 +471,7 @@ static bool js_audioengine_AudioEngine_preload(se::State& s) } while(false) ; if (!ok) { ok = true; break; } - cocos2d::AudioEngine::preload(arg0, arg1); + cc::AudioEngine::preload(arg0, arg1); return true; } } while (false); @@ -480,7 +480,7 @@ static bool js_audioengine_AudioEngine_preload(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); if (!ok) { ok = true; break; } - cocos2d::AudioEngine::preload(arg0); + cc::AudioEngine::preload(arg0); return true; } } while (false); @@ -498,7 +498,7 @@ static bool js_audioengine_AudioEngine_setEnabled(se::State& s) bool arg0; ok &= seval_to_boolean(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_setEnabled : Error processing arguments"); - cocos2d::AudioEngine::setEnabled(arg0); + cc::AudioEngine::setEnabled(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -515,7 +515,7 @@ static bool js_audioengine_AudioEngine_play2d(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_play2d : Error processing arguments"); - int result = cocos2d::AudioEngine::play2d(arg0); + int result = cc::AudioEngine::play2d(arg0); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_play2d : Error processing arguments"); return true; @@ -526,7 +526,7 @@ static bool js_audioengine_AudioEngine_play2d(se::State& s) ok &= seval_to_std_string(args[0], &arg0); ok &= seval_to_boolean(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_play2d : Error processing arguments"); - int result = cocos2d::AudioEngine::play2d(arg0, arg1); + int result = cc::AudioEngine::play2d(arg0, arg1); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_play2d : Error processing arguments"); return true; @@ -539,7 +539,7 @@ static bool js_audioengine_AudioEngine_play2d(se::State& s) ok &= seval_to_boolean(args[1], &arg1); ok &= seval_to_float(args[2], &arg2); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_play2d : Error processing arguments"); - int result = cocos2d::AudioEngine::play2d(arg0, arg1, arg2); + int result = cc::AudioEngine::play2d(arg0, arg1, arg2); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_play2d : Error processing arguments"); return true; @@ -548,13 +548,13 @@ static bool js_audioengine_AudioEngine_play2d(se::State& s) std::string arg0; bool arg1; float arg2 = 0; - const cocos2d::AudioProfile* arg3 = nullptr; + const cc::AudioProfile* arg3 = nullptr; ok &= seval_to_std_string(args[0], &arg0); ok &= seval_to_boolean(args[1], &arg1); ok &= seval_to_float(args[2], &arg2); ok &= seval_to_native_ptr(args[3], &arg3); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_play2d : Error processing arguments"); - int result = cocos2d::AudioEngine::play2d(arg0, arg1, arg2, arg3); + int result = cc::AudioEngine::play2d(arg0, arg1, arg2, arg3); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_play2d : Error processing arguments"); return true; @@ -573,7 +573,7 @@ static bool js_audioengine_AudioEngine_getState(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getState : Error processing arguments"); - int result = (int)cocos2d::AudioEngine::getState(arg0); + int result = (int)cc::AudioEngine::getState(arg0); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getState : Error processing arguments"); return true; @@ -592,7 +592,7 @@ static bool js_audioengine_AudioEngine_resume(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_resume : Error processing arguments"); - cocos2d::AudioEngine::resume(arg0); + cc::AudioEngine::resume(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -609,7 +609,7 @@ static bool js_audioengine_AudioEngine_stop(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_stop : Error processing arguments"); - cocos2d::AudioEngine::stop(arg0); + cc::AudioEngine::stop(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -626,7 +626,7 @@ static bool js_audioengine_AudioEngine_getDuration(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getDuration : Error processing arguments"); - float result = cocos2d::AudioEngine::getDuration(arg0); + float result = cc::AudioEngine::getDuration(arg0); ok &= float_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getDuration : Error processing arguments"); return true; @@ -647,7 +647,7 @@ static bool js_audioengine_AudioEngine_setLoop(se::State& s) do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); ok &= seval_to_boolean(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_setLoop : Error processing arguments"); - cocos2d::AudioEngine::setLoop(arg0, arg1); + cc::AudioEngine::setLoop(arg0, arg1); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2); @@ -661,7 +661,7 @@ static bool js_audioengine_AudioEngine_getDefaultProfile(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::AudioProfile* result = cocos2d::AudioEngine::getDefaultProfile(); + cc::AudioProfile* result = cc::AudioEngine::getDefaultProfile(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getDefaultProfile : Error processing arguments"); return true; @@ -712,7 +712,7 @@ static bool js_audioengine_AudioEngine_setFinishCallback(se::State& s) } while(false) ; SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_setFinishCallback : Error processing arguments"); - cocos2d::AudioEngine::setFinishCallback(arg0, arg1); + cc::AudioEngine::setFinishCallback(arg0, arg1); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2); @@ -730,7 +730,7 @@ static bool js_audioengine_AudioEngine_getProfile(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); if (!ok) { ok = true; break; } - cocos2d::AudioProfile* result = cocos2d::AudioEngine::getProfile(arg0); + cc::AudioProfile* result = cc::AudioEngine::getProfile(arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getProfile : Error processing arguments"); return true; @@ -741,7 +741,7 @@ static bool js_audioengine_AudioEngine_getProfile(se::State& s) int arg0 = 0; do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); if (!ok) { ok = true; break; } - cocos2d::AudioProfile* result = cocos2d::AudioEngine::getProfile(arg0); + cc::AudioProfile* result = cc::AudioEngine::getProfile(arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getProfile : Error processing arguments"); return true; @@ -758,7 +758,7 @@ static bool js_audioengine_AudioEngine_getPlayingAudioCount(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - int result = cocos2d::AudioEngine::getPlayingAudioCount(); + int result = cc::AudioEngine::getPlayingAudioCount(); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_audioengine_AudioEngine_getPlayingAudioCount : Error processing arguments"); return true; @@ -805,10 +805,10 @@ bool js_register_audioengine_AudioEngine(se::Object* obj) cls->defineStaticFunction("getProfile", _SE(js_audioengine_AudioEngine_getProfile)); cls->defineStaticFunction("getPlayingAudioCount", _SE(js_audioengine_AudioEngine_getPlayingAudioCount)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_AudioEngine_proto = cls->getProto(); - __jsb_cocos2d_AudioEngine_class = cls; + __jsb_cc_AudioEngine_proto = cls->getProto(); + __jsb_cc_AudioEngine_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.hpp index f8d356edc9..a64f31e48b 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.hpp @@ -4,17 +4,17 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_AudioProfile_proto; -extern se::Class* __jsb_cocos2d_AudioProfile_class; +extern se::Object* __jsb_cc_AudioProfile_proto; +extern se::Class* __jsb_cc_AudioProfile_class; -bool js_register_cocos2d_AudioProfile(se::Object* obj); +bool js_register_cc_AudioProfile(se::Object* obj); bool register_all_audioengine(se::Object* obj); SE_DECLARE_FUNC(js_audioengine_AudioProfile_AudioProfile); -extern se::Object* __jsb_cocos2d_AudioEngine_proto; -extern se::Class* __jsb_cocos2d_AudioEngine_class; +extern se::Object* __jsb_cc_AudioEngine_proto; +extern se::Class* __jsb_cc_AudioEngine_class; -bool js_register_cocos2d_AudioEngine(se::Object* obj); +bool js_register_cc_AudioEngine(se::Object* obj); bool register_all_audioengine(se::Object* obj); SE_DECLARE_FUNC(js_audioengine_AudioEngine_lazyInit); SE_DECLARE_FUNC(js_audioengine_AudioEngine_setCurrentTime); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index 486d6891ef..8cdddb58e6 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -10,18 +10,18 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_FileUtils_proto = nullptr; -se::Class* __jsb_cocos2d_FileUtils_class = nullptr; +se::Object* __jsb_cc_FileUtils_proto = nullptr; +se::Class* __jsb_cc_FileUtils_class = nullptr; static bool js_engine_FileUtils_writeDataToFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_writeDataToFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { - cocos2d::Data arg0; + cc::Data arg0; std::string arg1; ok &= seval_to_Data(args[0], &arg0); ok &= seval_to_std_string(args[1], &arg1); @@ -38,7 +38,7 @@ SE_BIND_FUNC(js_engine_FileUtils_writeDataToFile) static bool js_engine_FileUtils_fullPathForFilename(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_fullPathForFilename : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -59,7 +59,7 @@ SE_BIND_FUNC(js_engine_FileUtils_fullPathForFilename) static bool js_engine_FileUtils_getStringFromFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getStringFromFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -80,7 +80,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getStringFromFile) static bool js_engine_FileUtils_removeFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_removeFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -101,7 +101,7 @@ SE_BIND_FUNC(js_engine_FileUtils_removeFile) static bool js_engine_FileUtils_getDataFromFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getDataFromFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -110,7 +110,7 @@ static bool js_engine_FileUtils_getDataFromFile(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getDataFromFile : Error processing arguments"); - cocos2d::Data result = cobj->getDataFromFile(arg0); + cc::Data result = cobj->getDataFromFile(arg0); ok &= Data_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getDataFromFile : Error processing arguments"); return true; @@ -122,7 +122,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getDataFromFile) static bool js_engine_FileUtils_isAbsolutePath(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_isAbsolutePath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -144,7 +144,7 @@ SE_BIND_FUNC(js_engine_FileUtils_isAbsolutePath) static bool js_engine_FileUtils_renameFile(se::State& s) { CC_UNUSED bool ok = true; - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2( cobj, false, "js_engine_FileUtils_renameFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -188,7 +188,7 @@ SE_BIND_FUNC(js_engine_FileUtils_renameFile) static bool js_engine_FileUtils_normalizePath(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_normalizePath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -209,7 +209,7 @@ SE_BIND_FUNC(js_engine_FileUtils_normalizePath) static bool js_engine_FileUtils_getDefaultResourceRootPath(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getDefaultResourceRootPath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -227,7 +227,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getDefaultResourceRootPath) static bool js_engine_FileUtils_loadFilenameLookupDictionaryFromFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_loadFilenameLookupDictionaryFromFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -246,7 +246,7 @@ SE_BIND_FUNC(js_engine_FileUtils_loadFilenameLookupDictionaryFromFile) static bool js_engine_FileUtils_isPopupNotify(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_isPopupNotify : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -264,7 +264,7 @@ SE_BIND_FUNC(js_engine_FileUtils_isPopupNotify) static bool js_engine_FileUtils_getValueVectorFromFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getValueVectorFromFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -273,7 +273,7 @@ static bool js_engine_FileUtils_getValueVectorFromFile(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getValueVectorFromFile : Error processing arguments"); - cocos2d::ValueVector result = cobj->getValueVectorFromFile(arg0); + cc::ValueVector result = cobj->getValueVectorFromFile(arg0); ok &= ccvaluevector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getValueVectorFromFile : Error processing arguments"); return true; @@ -285,7 +285,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getValueVectorFromFile) static bool js_engine_FileUtils_getSearchPaths(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getSearchPaths : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -303,7 +303,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getSearchPaths) static bool js_engine_FileUtils_getFileDir(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getFileDir : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -324,13 +324,13 @@ SE_BIND_FUNC(js_engine_FileUtils_getFileDir) static bool js_engine_FileUtils_writeToFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_writeToFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { - cocos2d::ValueMap arg0; + cc::ValueMap arg0; std::string arg1; ok &= seval_to_ccvaluemap(args[0], &arg0); ok &= seval_to_std_string(args[1], &arg1); @@ -347,7 +347,7 @@ SE_BIND_FUNC(js_engine_FileUtils_writeToFile) static bool js_engine_FileUtils_getOriginalSearchPaths(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getOriginalSearchPaths : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -365,7 +365,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getOriginalSearchPaths) static bool js_engine_FileUtils_listFiles(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_listFiles : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -386,7 +386,7 @@ SE_BIND_FUNC(js_engine_FileUtils_listFiles) static bool js_engine_FileUtils_getValueMapFromFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getValueMapFromFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -395,7 +395,7 @@ static bool js_engine_FileUtils_getValueMapFromFile(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getValueMapFromFile : Error processing arguments"); - cocos2d::ValueMap result = cobj->getValueMapFromFile(arg0); + cc::ValueMap result = cobj->getValueMapFromFile(arg0); ok &= ccvaluemap_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getValueMapFromFile : Error processing arguments"); return true; @@ -407,7 +407,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getValueMapFromFile) static bool js_engine_FileUtils_getFileSize(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getFileSize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -428,7 +428,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getFileSize) static bool js_engine_FileUtils_getValueMapFromData(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getValueMapFromData : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -439,7 +439,7 @@ static bool js_engine_FileUtils_getValueMapFromData(se::State& s) std::string arg0_tmp; ok &= seval_to_std_string(args[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (int)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getValueMapFromData : Error processing arguments"); - cocos2d::ValueMap result = cobj->getValueMapFromData(arg0, arg1); + cc::ValueMap result = cobj->getValueMapFromData(arg0, arg1); ok &= ccvaluemap_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getValueMapFromData : Error processing arguments"); return true; @@ -451,7 +451,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getValueMapFromData) static bool js_engine_FileUtils_removeDirectory(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_removeDirectory : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -472,7 +472,7 @@ SE_BIND_FUNC(js_engine_FileUtils_removeDirectory) static bool js_engine_FileUtils_setSearchPaths(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_setSearchPaths : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -491,7 +491,7 @@ SE_BIND_FUNC(js_engine_FileUtils_setSearchPaths) static bool js_engine_FileUtils_writeStringToFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_writeStringToFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -514,7 +514,7 @@ SE_BIND_FUNC(js_engine_FileUtils_writeStringToFile) static bool js_engine_FileUtils_setSearchResolutionsOrder(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_setSearchResolutionsOrder : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -533,7 +533,7 @@ SE_BIND_FUNC(js_engine_FileUtils_setSearchResolutionsOrder) static bool js_engine_FileUtils_addSearchResolutionsOrder(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_addSearchResolutionsOrder : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -561,7 +561,7 @@ SE_BIND_FUNC(js_engine_FileUtils_addSearchResolutionsOrder) static bool js_engine_FileUtils_addSearchPath(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_addSearchPath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -589,13 +589,13 @@ SE_BIND_FUNC(js_engine_FileUtils_addSearchPath) static bool js_engine_FileUtils_writeValueVectorToFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_writeValueVectorToFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { - cocos2d::ValueVector arg0; + cc::ValueVector arg0; std::string arg1; ok &= seval_to_ccvaluevector(args[0], &arg0); ok &= seval_to_std_string(args[1], &arg1); @@ -612,7 +612,7 @@ SE_BIND_FUNC(js_engine_FileUtils_writeValueVectorToFile) static bool js_engine_FileUtils_isFileExist(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_isFileExist : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -633,7 +633,7 @@ SE_BIND_FUNC(js_engine_FileUtils_isFileExist) static bool js_engine_FileUtils_purgeCachedEntries(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_purgeCachedEntries : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -648,7 +648,7 @@ SE_BIND_FUNC(js_engine_FileUtils_purgeCachedEntries) static bool js_engine_FileUtils_fullPathFromRelativeFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_fullPathFromRelativeFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -671,7 +671,7 @@ SE_BIND_FUNC(js_engine_FileUtils_fullPathFromRelativeFile) static bool js_engine_FileUtils_getSuitableFOpen(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getSuitableFOpen : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -692,13 +692,13 @@ SE_BIND_FUNC(js_engine_FileUtils_getSuitableFOpen) static bool js_engine_FileUtils_writeValueMapToFile(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_writeValueMapToFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { - cocos2d::ValueMap arg0; + cc::ValueMap arg0; std::string arg1; ok &= seval_to_ccvaluemap(args[0], &arg0); ok &= seval_to_std_string(args[1], &arg1); @@ -715,7 +715,7 @@ SE_BIND_FUNC(js_engine_FileUtils_writeValueMapToFile) static bool js_engine_FileUtils_getFileExtension(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getFileExtension : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -736,7 +736,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getFileExtension) static bool js_engine_FileUtils_setWritablePath(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_setWritablePath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -755,7 +755,7 @@ SE_BIND_FUNC(js_engine_FileUtils_setWritablePath) static bool js_engine_FileUtils_setPopupNotify(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_setPopupNotify : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -774,7 +774,7 @@ SE_BIND_FUNC(js_engine_FileUtils_setPopupNotify) static bool js_engine_FileUtils_isDirectoryExist(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_isDirectoryExist : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -795,7 +795,7 @@ SE_BIND_FUNC(js_engine_FileUtils_isDirectoryExist) static bool js_engine_FileUtils_setDefaultResourceRootPath(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_setDefaultResourceRootPath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -814,7 +814,7 @@ SE_BIND_FUNC(js_engine_FileUtils_setDefaultResourceRootPath) static bool js_engine_FileUtils_getSearchResolutionsOrder(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getSearchResolutionsOrder : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -832,7 +832,7 @@ SE_BIND_FUNC(js_engine_FileUtils_getSearchResolutionsOrder) static bool js_engine_FileUtils_createDirectory(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_createDirectory : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -853,7 +853,7 @@ SE_BIND_FUNC(js_engine_FileUtils_createDirectory) static bool js_engine_FileUtils_listFilesRecursively(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_listFilesRecursively : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -874,7 +874,7 @@ SE_BIND_FUNC(js_engine_FileUtils_listFilesRecursively) static bool js_engine_FileUtils_getWritablePath(se::State& s) { - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_FileUtils_getWritablePath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -896,10 +896,10 @@ static bool js_engine_FileUtils_setDelegate(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::FileUtils* arg0 = nullptr; + cc::FileUtils* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_setDelegate : Error processing arguments"); - cocos2d::FileUtils::setDelegate(arg0); + cc::FileUtils::setDelegate(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -913,7 +913,7 @@ static bool js_engine_FileUtils_getInstance(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::FileUtils* result = cocos2d::FileUtils::getInstance(); + cc::FileUtils* result = cc::FileUtils::getInstance(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_FileUtils_getInstance : Error processing arguments"); return true; @@ -925,19 +925,19 @@ SE_BIND_FUNC(js_engine_FileUtils_getInstance) -static bool js_cocos2d_FileUtils_finalize(se::State& s) +static bool js_cc_FileUtils_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::FileUtils)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::FileUtils)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::FileUtils* cobj = (cocos2d::FileUtils*)s.nativeThisObject(); + cc::FileUtils* cobj = (cc::FileUtils*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_FileUtils_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_FileUtils_finalize) bool js_register_engine_FileUtils(se::Object* obj) { @@ -986,19 +986,19 @@ bool js_register_engine_FileUtils(se::Object* obj) cls->defineFunction("getWritablePath", _SE(js_engine_FileUtils_getWritablePath)); cls->defineStaticFunction("setDelegate", _SE(js_engine_FileUtils_setDelegate)); cls->defineStaticFunction("getInstance", _SE(js_engine_FileUtils_getInstance)); - cls->defineFinalizeFunction(_SE(js_cocos2d_FileUtils_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_FileUtils_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_FileUtils_proto = cls->getProto(); - __jsb_cocos2d_FileUtils_class = cls; + __jsb_cc_FileUtils_proto = cls->getProto(); + __jsb_cc_FileUtils_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_Device_proto = nullptr; -se::Class* __jsb_cocos2d_Device_class = nullptr; +se::Object* __jsb_cc_Device_proto = nullptr; +se::Class* __jsb_cc_Device_class = nullptr; static bool js_engine_Device_getDevicePixelRatio(se::State& s) { @@ -1006,7 +1006,7 @@ static bool js_engine_Device_getDevicePixelRatio(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - int result = cocos2d::Device::getDevicePixelRatio(); + int result = cc::Device::getDevicePixelRatio(); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_Device_getDevicePixelRatio : Error processing arguments"); return true; @@ -1025,7 +1025,7 @@ static bool js_engine_Device_setAccelerometerEnabled(se::State& s) bool arg0; ok &= seval_to_boolean(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_Device_setAccelerometerEnabled : Error processing arguments"); - cocos2d::Device::setAccelerometerEnabled(arg0); + cc::Device::setAccelerometerEnabled(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -1042,7 +1042,7 @@ static bool js_engine_Device_setAccelerometerInterval(se::State& s) float arg0 = 0; ok &= seval_to_float(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_Device_setAccelerometerInterval : Error processing arguments"); - cocos2d::Device::setAccelerometerInterval(arg0); + cc::Device::setAccelerometerInterval(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -1059,7 +1059,7 @@ static bool js_engine_Device_vibrate(se::State& s) float arg0 = 0; ok &= seval_to_float(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_Device_vibrate : Error processing arguments"); - cocos2d::Device::vibrate(arg0); + cc::Device::vibrate(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -1076,7 +1076,7 @@ static bool js_engine_Device_setKeepScreenOn(se::State& s) bool arg0; ok &= seval_to_boolean(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_Device_setKeepScreenOn : Error processing arguments"); - cocos2d::Device::setKeepScreenOn(arg0); + cc::Device::setKeepScreenOn(arg0); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -1090,7 +1090,7 @@ static bool js_engine_Device_getNetworkType(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - int result = (int)cocos2d::Device::getNetworkType(); + int result = (int)cc::Device::getNetworkType(); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_Device_getNetworkType : Error processing arguments"); return true; @@ -1106,7 +1106,7 @@ static bool js_engine_Device_getBatteryLevel(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - float result = cocos2d::Device::getBatteryLevel(); + float result = cc::Device::getBatteryLevel(); ok &= float_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_Device_getBatteryLevel : Error processing arguments"); return true; @@ -1122,7 +1122,7 @@ static bool js_engine_Device_getDeviceRotation(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - int result = (int)cocos2d::Device::getDeviceRotation(); + int result = (int)cc::Device::getDeviceRotation(); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_Device_getDeviceRotation : Error processing arguments"); return true; @@ -1138,7 +1138,7 @@ static bool js_engine_Device_getDPI(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - int result = cocos2d::Device::getDPI(); + int result = cc::Device::getDPI(); ok &= int32_to_seval((int)result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_Device_getDPI : Error processing arguments"); return true; @@ -1154,7 +1154,7 @@ static bool js_engine_Device_getSafeAreaEdge(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::Vec4 result = cocos2d::Device::getSafeAreaEdge(); + cc::Vec4 result = cc::Device::getSafeAreaEdge(); ok &= Vec4_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_Device_getSafeAreaEdge : Error processing arguments"); return true; @@ -1170,7 +1170,7 @@ static bool js_engine_Device_getDeviceModel(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - std::string result = cocos2d::Device::getDeviceModel(); + std::string result = cc::Device::getDeviceModel(); ok &= std_string_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_Device_getDeviceModel : Error processing arguments"); return true; @@ -1199,21 +1199,21 @@ bool js_register_engine_Device(se::Object* obj) cls->defineStaticFunction("getSafeAreaEdge", _SE(js_engine_Device_getSafeAreaEdge)); cls->defineStaticFunction("getDeviceModel", _SE(js_engine_Device_getDeviceModel)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_Device_proto = cls->getProto(); - __jsb_cocos2d_Device_class = cls; + __jsb_cc_Device_proto = cls->getProto(); + __jsb_cc_Device_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_SAXParser_proto = nullptr; -se::Class* __jsb_cocos2d_SAXParser_class = nullptr; +se::Object* __jsb_cc_SAXParser_proto = nullptr; +se::Class* __jsb_cc_SAXParser_class = nullptr; static bool js_engine_SAXParser_init(se::State& s) { - cocos2d::SAXParser* cobj = (cocos2d::SAXParser*)s.nativeThisObject(); + cc::SAXParser* cobj = (cc::SAXParser*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_SAXParser_init : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1241,21 +1241,21 @@ bool js_register_engine_SAXParser(se::Object* obj) cls->defineFunction("init", _SE(js_engine_SAXParser_init)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_SAXParser_proto = cls->getProto(); - __jsb_cocos2d_SAXParser_class = cls; + __jsb_cc_SAXParser_proto = cls->getProto(); + __jsb_cc_SAXParser_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_CanvasGradient_proto = nullptr; -se::Class* __jsb_cocos2d_CanvasGradient_class = nullptr; +se::Object* __jsb_cc_CanvasGradient_proto = nullptr; +se::Class* __jsb_cc_CanvasGradient_class = nullptr; static bool js_engine_CanvasGradient_addColorStop(se::State& s) { - cocos2d::CanvasGradient* cobj = (cocos2d::CanvasGradient*)s.nativeThisObject(); + cc::CanvasGradient* cobj = (cc::CanvasGradient*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasGradient_addColorStop : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1274,56 +1274,56 @@ static bool js_engine_CanvasGradient_addColorStop(se::State& s) } SE_BIND_FUNC(js_engine_CanvasGradient_addColorStop) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_CanvasGradient_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_CanvasGradient_finalize) static bool js_engine_CanvasGradient_constructor(se::State& s) { - cocos2d::CanvasGradient* cobj = JSB_ALLOC(cocos2d::CanvasGradient); + cc::CanvasGradient* cobj = JSB_ALLOC(cc::CanvasGradient); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } -SE_BIND_CTOR(js_engine_CanvasGradient_constructor, __jsb_cocos2d_CanvasGradient_class, js_cocos2d_CanvasGradient_finalize) +SE_BIND_CTOR(js_engine_CanvasGradient_constructor, __jsb_cc_CanvasGradient_class, js_cc_CanvasGradient_finalize) -static bool js_cocos2d_CanvasGradient_finalize(se::State& s) +static bool js_cc_CanvasGradient_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::CanvasGradient)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::CanvasGradient)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::CanvasGradient* cobj = (cocos2d::CanvasGradient*)s.nativeThisObject(); + cc::CanvasGradient* cobj = (cc::CanvasGradient*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_CanvasGradient_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_CanvasGradient_finalize) bool js_register_engine_CanvasGradient(se::Object* obj) { auto cls = se::Class::create("CanvasGradient", obj, nullptr, _SE(js_engine_CanvasGradient_constructor)); cls->defineFunction("addColorStop", _SE(js_engine_CanvasGradient_addColorStop)); - cls->defineFinalizeFunction(_SE(js_cocos2d_CanvasGradient_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_CanvasGradient_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_CanvasGradient_proto = cls->getProto(); - __jsb_cocos2d_CanvasGradient_class = cls; + __jsb_cc_CanvasGradient_proto = cls->getProto(); + __jsb_cc_CanvasGradient_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_CanvasRenderingContext2D_proto = nullptr; -se::Class* __jsb_cocos2d_CanvasRenderingContext2D_class = nullptr; +se::Object* __jsb_cc_CanvasRenderingContext2D_proto = nullptr; +se::Class* __jsb_cc_CanvasRenderingContext2D_class = nullptr; static bool js_engine_CanvasRenderingContext2D_restore(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_restore : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1338,7 +1338,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_restore) static bool js_engine_CanvasRenderingContext2D_moveTo(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_moveTo : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1359,7 +1359,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_moveTo) static bool js_engine_CanvasRenderingContext2D_lineTo(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_lineTo : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1380,7 +1380,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_lineTo) static bool js_engine_CanvasRenderingContext2D_setTransform(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_setTransform : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1409,7 +1409,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_setTransform) static bool js_engine_CanvasRenderingContext2D_stroke(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_stroke : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1424,7 +1424,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_stroke) static bool js_engine_CanvasRenderingContext2D_measureText(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_measureText : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1433,7 +1433,7 @@ static bool js_engine_CanvasRenderingContext2D_measureText(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_engine_CanvasRenderingContext2D_measureText : Error processing arguments"); - cocos2d::Size result = cobj->measureText(arg0); + cc::Size result = cobj->measureText(arg0); ok &= Size_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_CanvasRenderingContext2D_measureText : Error processing arguments"); return true; @@ -1445,7 +1445,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_measureText) static bool js_engine_CanvasRenderingContext2D_fill(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_fill : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1460,13 +1460,13 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_fill) static bool js_engine_CanvasRenderingContext2D__fillImageData(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D__fillImageData : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 5) { - cocos2d::Data arg0; + cc::Data arg0; float arg1 = 0; float arg2 = 0; float arg3 = 0; @@ -1487,7 +1487,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D__fillImageData) static bool js_engine_CanvasRenderingContext2D_scale(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_scale : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1508,7 +1508,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_scale) static bool js_engine_CanvasRenderingContext2D_clearRect(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_clearRect : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1533,7 +1533,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_clearRect) static bool js_engine_CanvasRenderingContext2D_transform(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_transform : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1562,7 +1562,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_transform) static bool js_engine_CanvasRenderingContext2D_fillText(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_fillText : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1598,7 +1598,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_fillText) static bool js_engine_CanvasRenderingContext2D_strokeText(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_strokeText : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1634,7 +1634,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_strokeText) static bool js_engine_CanvasRenderingContext2D_save(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_save : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1649,7 +1649,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_save) static bool js_engine_CanvasRenderingContext2D_fillRect(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_fillRect : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1674,7 +1674,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_fillRect) static bool js_engine_CanvasRenderingContext2D_rotate(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_rotate : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1693,7 +1693,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_rotate) static bool js_engine_CanvasRenderingContext2D_beginPath(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_beginPath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1708,7 +1708,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_beginPath) static bool js_engine_CanvasRenderingContext2D_rect(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_rect : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1733,7 +1733,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_rect) static bool js_engine_CanvasRenderingContext2D_translate(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_translate : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1754,7 +1754,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_translate) static bool js_engine_CanvasRenderingContext2D_createLinearGradient(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_createLinearGradient : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1769,7 +1769,7 @@ static bool js_engine_CanvasRenderingContext2D_createLinearGradient(se::State& s ok &= seval_to_float(args[2], &arg2); ok &= seval_to_float(args[3], &arg3); SE_PRECONDITION2(ok, false, "js_engine_CanvasRenderingContext2D_createLinearGradient : Error processing arguments"); - cocos2d::CanvasGradient* result = cobj->createLinearGradient(arg0, arg1, arg2, arg3); + cc::CanvasGradient* result = cobj->createLinearGradient(arg0, arg1, arg2, arg3); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_engine_CanvasRenderingContext2D_createLinearGradient : Error processing arguments"); return true; @@ -1781,7 +1781,7 @@ SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_createLinearGradient) static bool js_engine_CanvasRenderingContext2D_closePath(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_engine_CanvasRenderingContext2D_closePath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1794,7 +1794,7 @@ static bool js_engine_CanvasRenderingContext2D_closePath(se::State& s) } SE_BIND_FUNC(js_engine_CanvasRenderingContext2D_closePath) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_CanvasRenderingContext2D_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_CanvasRenderingContext2D_finalize) static bool js_engine_CanvasRenderingContext2D_constructor(se::State& s) { @@ -1805,29 +1805,29 @@ static bool js_engine_CanvasRenderingContext2D_constructor(se::State& s) ok &= seval_to_float(args[0], &arg0); ok &= seval_to_float(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_engine_CanvasRenderingContext2D_constructor : Error processing arguments"); - cocos2d::CanvasRenderingContext2D* cobj = JSB_ALLOC(cocos2d::CanvasRenderingContext2D, arg0, arg1); + cc::CanvasRenderingContext2D* cobj = JSB_ALLOC(cc::CanvasRenderingContext2D, arg0, arg1); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } -SE_BIND_CTOR(js_engine_CanvasRenderingContext2D_constructor, __jsb_cocos2d_CanvasRenderingContext2D_class, js_cocos2d_CanvasRenderingContext2D_finalize) +SE_BIND_CTOR(js_engine_CanvasRenderingContext2D_constructor, __jsb_cc_CanvasRenderingContext2D_class, js_cc_CanvasRenderingContext2D_finalize) -static bool js_cocos2d_CanvasRenderingContext2D_finalize(se::State& s) +static bool js_cc_CanvasRenderingContext2D_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::CanvasRenderingContext2D)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::CanvasRenderingContext2D)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_CanvasRenderingContext2D_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_CanvasRenderingContext2D_finalize) bool js_register_engine_CanvasRenderingContext2D(se::Object* obj) { @@ -1854,12 +1854,12 @@ bool js_register_engine_CanvasRenderingContext2D(se::Object* obj) cls->defineFunction("translate", _SE(js_engine_CanvasRenderingContext2D_translate)); cls->defineFunction("createLinearGradient", _SE(js_engine_CanvasRenderingContext2D_createLinearGradient)); cls->defineFunction("closePath", _SE(js_engine_CanvasRenderingContext2D_closePath)); - cls->defineFinalizeFunction(_SE(js_cocos2d_CanvasRenderingContext2D_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_CanvasRenderingContext2D_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_CanvasRenderingContext2D_proto = cls->getProto(); - __jsb_cocos2d_CanvasRenderingContext2D_class = cls; + __jsb_cc_CanvasRenderingContext2D_proto = cls->getProto(); + __jsb_cc_CanvasRenderingContext2D_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp index 3650f1dddd..adadc32b7f 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp @@ -3,10 +3,10 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_FileUtils_proto; -extern se::Class* __jsb_cocos2d_FileUtils_class; +extern se::Object* __jsb_cc_FileUtils_proto; +extern se::Class* __jsb_cc_FileUtils_class; -bool js_register_cocos2d_FileUtils(se::Object* obj); +bool js_register_cc_FileUtils(se::Object* obj); bool register_all_engine(se::Object* obj); SE_DECLARE_FUNC(js_engine_FileUtils_writeDataToFile); SE_DECLARE_FUNC(js_engine_FileUtils_fullPathForFilename); @@ -52,10 +52,10 @@ SE_DECLARE_FUNC(js_engine_FileUtils_getWritablePath); SE_DECLARE_FUNC(js_engine_FileUtils_setDelegate); SE_DECLARE_FUNC(js_engine_FileUtils_getInstance); -extern se::Object* __jsb_cocos2d_Device_proto; -extern se::Class* __jsb_cocos2d_Device_class; +extern se::Object* __jsb_cc_Device_proto; +extern se::Class* __jsb_cc_Device_class; -bool js_register_cocos2d_Device(se::Object* obj); +bool js_register_cc_Device(se::Object* obj); bool register_all_engine(se::Object* obj); SE_DECLARE_FUNC(js_engine_Device_getDevicePixelRatio); SE_DECLARE_FUNC(js_engine_Device_setAccelerometerEnabled); @@ -69,25 +69,25 @@ SE_DECLARE_FUNC(js_engine_Device_getDPI); SE_DECLARE_FUNC(js_engine_Device_getSafeAreaEdge); SE_DECLARE_FUNC(js_engine_Device_getDeviceModel); -extern se::Object* __jsb_cocos2d_SAXParser_proto; -extern se::Class* __jsb_cocos2d_SAXParser_class; +extern se::Object* __jsb_cc_SAXParser_proto; +extern se::Class* __jsb_cc_SAXParser_class; -bool js_register_cocos2d_SAXParser(se::Object* obj); +bool js_register_cc_SAXParser(se::Object* obj); bool register_all_engine(se::Object* obj); SE_DECLARE_FUNC(js_engine_SAXParser_init); -extern se::Object* __jsb_cocos2d_CanvasGradient_proto; -extern se::Class* __jsb_cocos2d_CanvasGradient_class; +extern se::Object* __jsb_cc_CanvasGradient_proto; +extern se::Class* __jsb_cc_CanvasGradient_class; -bool js_register_cocos2d_CanvasGradient(se::Object* obj); +bool js_register_cc_CanvasGradient(se::Object* obj); bool register_all_engine(se::Object* obj); SE_DECLARE_FUNC(js_engine_CanvasGradient_addColorStop); SE_DECLARE_FUNC(js_engine_CanvasGradient_CanvasGradient); -extern se::Object* __jsb_cocos2d_CanvasRenderingContext2D_proto; -extern se::Class* __jsb_cocos2d_CanvasRenderingContext2D_class; +extern se::Object* __jsb_cc_CanvasRenderingContext2D_proto; +extern se::Class* __jsb_cc_CanvasRenderingContext2D_class; -bool js_register_cocos2d_CanvasRenderingContext2D(se::Object* obj); +bool js_register_cc_CanvasRenderingContext2D(se::Object* obj); bool register_all_engine(se::Object* obj); SE_DECLARE_FUNC(js_engine_CanvasRenderingContext2D_restore); SE_DECLARE_FUNC(js_engine_CanvasRenderingContext2D_moveTo); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp index 503d5e770b..6ae2bf02d4 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp @@ -10,18 +10,18 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_extension_EventAssetsManagerEx_proto = nullptr; -se::Class* __jsb_cocos2d_extension_EventAssetsManagerEx_class = nullptr; +se::Object* __jsb_cc_extension_EventAssetsManagerEx_proto = nullptr; +se::Class* __jsb_cc_extension_EventAssetsManagerEx_class = nullptr; static bool js_extension_EventAssetsManagerEx_getAssetsManagerEx(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getAssetsManagerEx : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::extension::AssetsManagerEx* result = cobj->getAssetsManagerEx(); + cc::extension::AssetsManagerEx* result = cobj->getAssetsManagerEx(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_extension_EventAssetsManagerEx_getAssetsManagerEx : Error processing arguments"); return true; @@ -33,7 +33,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getAssetsManagerEx) static bool js_extension_EventAssetsManagerEx_getDownloadedFiles(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getDownloadedFiles : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -51,7 +51,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getDownloadedFiles) static bool js_extension_EventAssetsManagerEx_getTotalFiles(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getTotalFiles : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -69,7 +69,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getTotalFiles) static bool js_extension_EventAssetsManagerEx_getAssetId(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getAssetId : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -87,7 +87,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getAssetId) static bool js_extension_EventAssetsManagerEx_getTotalBytes(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getTotalBytes : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -105,7 +105,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getTotalBytes) static bool js_extension_EventAssetsManagerEx_getCURLECode(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getCURLECode : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -123,7 +123,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getCURLECode) static bool js_extension_EventAssetsManagerEx_getMessage(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getMessage : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -141,7 +141,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getMessage) static bool js_extension_EventAssetsManagerEx_getCURLMCode(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getCURLMCode : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -159,7 +159,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getCURLMCode) static bool js_extension_EventAssetsManagerEx_getDownloadedBytes(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getDownloadedBytes : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -177,7 +177,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getDownloadedBytes) static bool js_extension_EventAssetsManagerEx_getPercentByFile(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getPercentByFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -195,7 +195,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getPercentByFile) static bool js_extension_EventAssetsManagerEx_getEventCode(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getEventCode : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -213,7 +213,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getEventCode) static bool js_extension_EventAssetsManagerEx_getPercent(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getPercent : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -231,7 +231,7 @@ SE_BIND_FUNC(js_extension_EventAssetsManagerEx_getPercent) static bool js_extension_EventAssetsManagerEx_isResuming(se::State& s) { - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_isResuming : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -247,36 +247,36 @@ static bool js_extension_EventAssetsManagerEx_isResuming(se::State& s) } SE_BIND_FUNC(js_extension_EventAssetsManagerEx_isResuming) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_extension_EventAssetsManagerEx_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_extension_EventAssetsManagerEx_finalize) static bool js_extension_EventAssetsManagerEx_constructor(se::State& s) { CC_UNUSED bool ok = true; const auto& args = s.args(); std::string arg0; - cocos2d::extension::AssetsManagerEx* arg1 = nullptr; - cocos2d::extension::EventAssetsManagerEx::EventCode arg2; + cc::extension::AssetsManagerEx* arg1 = nullptr; + cc::extension::EventAssetsManagerEx::EventCode arg2; ok &= seval_to_std_string(args[0], &arg0); ok &= seval_to_native_ptr(args[1], &arg1); - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::extension::EventAssetsManagerEx::EventCode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::extension::EventAssetsManagerEx::EventCode)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_extension_EventAssetsManagerEx_constructor : Error processing arguments"); - cocos2d::extension::EventAssetsManagerEx* cobj = JSB_ALLOC(cocos2d::extension::EventAssetsManagerEx, arg0, arg1, arg2); + cc::extension::EventAssetsManagerEx* cobj = JSB_ALLOC(cc::extension::EventAssetsManagerEx, arg0, arg1, arg2); s.thisObject()->setPrivateData(cobj); return true; } -SE_BIND_CTOR(js_extension_EventAssetsManagerEx_constructor, __jsb_cocos2d_extension_EventAssetsManagerEx_class, js_cocos2d_extension_EventAssetsManagerEx_finalize) +SE_BIND_CTOR(js_extension_EventAssetsManagerEx_constructor, __jsb_cc_extension_EventAssetsManagerEx_class, js_cc_extension_EventAssetsManagerEx_finalize) -static bool js_cocos2d_extension_EventAssetsManagerEx_finalize(se::State& s) +static bool js_cc_extension_EventAssetsManagerEx_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::extension::EventAssetsManagerEx)", s.nativeThisObject()); - cocos2d::extension::EventAssetsManagerEx* cobj = (cocos2d::extension::EventAssetsManagerEx*)s.nativeThisObject(); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::extension::EventAssetsManagerEx)", s.nativeThisObject()); + cc::extension::EventAssetsManagerEx* cobj = (cc::extension::EventAssetsManagerEx*)s.nativeThisObject(); cobj->release(); return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_extension_EventAssetsManagerEx_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_extension_EventAssetsManagerEx_finalize) bool js_register_extension_EventAssetsManagerEx(se::Object* obj) { @@ -295,23 +295,23 @@ bool js_register_extension_EventAssetsManagerEx(se::Object* obj) cls->defineFunction("getEventCode", _SE(js_extension_EventAssetsManagerEx_getEventCode)); cls->defineFunction("getPercent", _SE(js_extension_EventAssetsManagerEx_getPercent)); cls->defineFunction("isResuming", _SE(js_extension_EventAssetsManagerEx_isResuming)); - cls->defineFinalizeFunction(_SE(js_cocos2d_extension_EventAssetsManagerEx_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_extension_EventAssetsManagerEx_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_extension_EventAssetsManagerEx_proto = cls->getProto(); - __jsb_cocos2d_extension_EventAssetsManagerEx_class = cls; + __jsb_cc_extension_EventAssetsManagerEx_proto = cls->getProto(); + __jsb_cc_extension_EventAssetsManagerEx_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_extension_Manifest_proto = nullptr; -se::Class* __jsb_cocos2d_extension_Manifest_class = nullptr; +se::Object* __jsb_cc_extension_Manifest_proto = nullptr; +se::Class* __jsb_cc_extension_Manifest_class = nullptr; static bool js_extension_Manifest_getManifestRoot(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getManifestRoot : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -329,7 +329,7 @@ SE_BIND_FUNC(js_extension_Manifest_getManifestRoot) static bool js_extension_Manifest_setUpdating(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_setUpdating : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -348,7 +348,7 @@ SE_BIND_FUNC(js_extension_Manifest_setUpdating) static bool js_extension_Manifest_getManifestFileUrl(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getManifestFileUrl : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -366,7 +366,7 @@ SE_BIND_FUNC(js_extension_Manifest_getManifestFileUrl) static bool js_extension_Manifest_isVersionLoaded(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_isVersionLoaded : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -384,7 +384,7 @@ SE_BIND_FUNC(js_extension_Manifest_isVersionLoaded) static bool js_extension_Manifest_parseFile(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_parseFile : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -403,7 +403,7 @@ SE_BIND_FUNC(js_extension_Manifest_parseFile) static bool js_extension_Manifest_isLoaded(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_isLoaded : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -421,7 +421,7 @@ SE_BIND_FUNC(js_extension_Manifest_isLoaded) static bool js_extension_Manifest_getPackageUrl(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getPackageUrl : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -439,7 +439,7 @@ SE_BIND_FUNC(js_extension_Manifest_getPackageUrl) static bool js_extension_Manifest_isUpdating(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_isUpdating : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -457,7 +457,7 @@ SE_BIND_FUNC(js_extension_Manifest_isUpdating) static bool js_extension_Manifest_getVersion(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getVersion : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -475,7 +475,7 @@ SE_BIND_FUNC(js_extension_Manifest_getVersion) static bool js_extension_Manifest_parseJSONString(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_parseJSONString : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -496,7 +496,7 @@ SE_BIND_FUNC(js_extension_Manifest_parseJSONString) static bool js_extension_Manifest_getVersionFileUrl(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getVersionFileUrl : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -514,7 +514,7 @@ SE_BIND_FUNC(js_extension_Manifest_getVersionFileUrl) static bool js_extension_Manifest_getSearchPaths(se::State& s) { - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getSearchPaths : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -530,7 +530,7 @@ static bool js_extension_Manifest_getSearchPaths(se::State& s) } SE_BIND_FUNC(js_extension_Manifest_getSearchPaths) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_extension_Manifest_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_extension_Manifest_finalize) static bool js_extension_Manifest_constructor(se::State& s) { @@ -545,14 +545,14 @@ static bool js_extension_Manifest_constructor(se::State& s) std::string arg1; ok &= seval_to_std_string(args[1], &arg1); if (!ok) { ok = true; break; } - cocos2d::extension::Manifest* cobj = JSB_ALLOC(cocos2d::extension::Manifest, arg0, arg1); + cc::extension::Manifest* cobj = JSB_ALLOC(cc::extension::Manifest, arg0, arg1); s.thisObject()->setPrivateData(cobj); return true; } } while(false); do { if (argc == 0) { - cocos2d::extension::Manifest* cobj = JSB_ALLOC(cocos2d::extension::Manifest); + cc::extension::Manifest* cobj = JSB_ALLOC(cc::extension::Manifest); s.thisObject()->setPrivateData(cobj); return true; } @@ -562,7 +562,7 @@ static bool js_extension_Manifest_constructor(se::State& s) std::string arg0; ok &= seval_to_std_string(args[0], &arg0); if (!ok) { ok = true; break; } - cocos2d::extension::Manifest* cobj = JSB_ALLOC(cocos2d::extension::Manifest, arg0); + cc::extension::Manifest* cobj = JSB_ALLOC(cc::extension::Manifest, arg0); s.thisObject()->setPrivateData(cobj); return true; } @@ -570,19 +570,19 @@ static bool js_extension_Manifest_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_extension_Manifest_constructor, __jsb_cocos2d_extension_Manifest_class, js_cocos2d_extension_Manifest_finalize) +SE_BIND_CTOR(js_extension_Manifest_constructor, __jsb_cc_extension_Manifest_class, js_cc_extension_Manifest_finalize) -static bool js_cocos2d_extension_Manifest_finalize(se::State& s) +static bool js_cc_extension_Manifest_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::extension::Manifest)", s.nativeThisObject()); - cocos2d::extension::Manifest* cobj = (cocos2d::extension::Manifest*)s.nativeThisObject(); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::extension::Manifest)", s.nativeThisObject()); + cc::extension::Manifest* cobj = (cc::extension::Manifest*)s.nativeThisObject(); cobj->release(); return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_extension_Manifest_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_extension_Manifest_finalize) bool js_register_extension_Manifest(se::Object* obj) { @@ -600,36 +600,36 @@ bool js_register_extension_Manifest(se::Object* obj) cls->defineFunction("parseJSONString", _SE(js_extension_Manifest_parseJSONString)); cls->defineFunction("getVersionFileUrl", _SE(js_extension_Manifest_getVersionFileUrl)); cls->defineFunction("getSearchPaths", _SE(js_extension_Manifest_getSearchPaths)); - cls->defineFinalizeFunction(_SE(js_cocos2d_extension_Manifest_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_extension_Manifest_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_extension_Manifest_proto = cls->getProto(); - __jsb_cocos2d_extension_Manifest_class = cls; + __jsb_cc_extension_Manifest_proto = cls->getProto(); + __jsb_cc_extension_Manifest_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_extension_AssetsManagerEx_proto = nullptr; -se::Class* __jsb_cocos2d_extension_AssetsManagerEx_class = nullptr; +se::Object* __jsb_cc_extension_AssetsManagerEx_proto = nullptr; +se::Class* __jsb_cc_extension_AssetsManagerEx_class = nullptr; static bool js_extension_AssetsManagerEx_setVerifyCallback(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_setVerifyCallback : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - std::function arg0; + std::function arg0; do { if (args[0].isObject() && args[0].toObject()->isFunction()) { se::Value jsThis(s.thisObject()); se::Value jsFunc(args[0]); jsThis.toObject()->attachObject(jsFunc.toObject()); - auto lambda = [=](const std::string& larg0, cocos2d::extension::ManifestAsset larg1) -> bool { + auto lambda = [=](const std::string& larg0, cc::extension::ManifestAsset larg1) -> bool { se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; @@ -669,7 +669,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_setVerifyCallback) static bool js_extension_AssetsManagerEx_getDownloadedFiles(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getDownloadedFiles : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -687,7 +687,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getDownloadedFiles) static bool js_extension_AssetsManagerEx_getState(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getState : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -705,7 +705,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getState) static bool js_extension_AssetsManagerEx_getMaxConcurrentTask(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getMaxConcurrentTask : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -723,7 +723,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getMaxConcurrentTask) static bool js_extension_AssetsManagerEx_getTotalFiles(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getTotalFiles : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -741,13 +741,13 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getTotalFiles) static bool js_extension_AssetsManagerEx_loadRemoteManifest(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_loadRemoteManifest : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::extension::Manifest* arg0 = nullptr; + cc::extension::Manifest* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_loadRemoteManifest : Error processing arguments"); bool result = cobj->loadRemoteManifest(arg0); @@ -762,7 +762,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_loadRemoteManifest) static bool js_extension_AssetsManagerEx_checkUpdate(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_checkUpdate : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -777,7 +777,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_checkUpdate) static bool js_extension_AssetsManagerEx_getTotalBytes(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getTotalBytes : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -796,7 +796,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getTotalBytes) static bool js_extension_AssetsManagerEx_loadLocalManifest(se::State& s) { CC_UNUSED bool ok = true; - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2( cobj, false, "js_extension_AssetsManagerEx_loadLocalManifest : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -814,7 +814,7 @@ static bool js_extension_AssetsManagerEx_loadLocalManifest(se::State& s) do { if (argc == 2) { - cocos2d::extension::Manifest* arg0 = nullptr; + cc::extension::Manifest* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); if (!ok) { ok = true; break; } std::string arg1; @@ -834,7 +834,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_loadLocalManifest) static bool js_extension_AssetsManagerEx_getStoragePath(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getStoragePath : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -852,7 +852,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getStoragePath) static bool js_extension_AssetsManagerEx_update(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_update : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -867,20 +867,20 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_update) static bool js_extension_AssetsManagerEx_setEventCallback(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_setEventCallback : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - std::function arg0; + std::function arg0; do { if (args[0].isObject() && args[0].toObject()->isFunction()) { se::Value jsThis(s.thisObject()); se::Value jsFunc(args[0]); jsThis.toObject()->attachObject(jsFunc.toObject()); - auto lambda = [=](cocos2d::extension::EventAssetsManagerEx* larg0) -> void { + auto lambda = [=](cc::extension::EventAssetsManagerEx* larg0) -> void { se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; @@ -915,7 +915,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_setEventCallback) static bool js_extension_AssetsManagerEx_setVersionCompareHandle(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_setVersionCompareHandle : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -968,7 +968,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_setVersionCompareHandle) static bool js_extension_AssetsManagerEx_setMaxConcurrentTask(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_setMaxConcurrentTask : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -987,7 +987,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_setMaxConcurrentTask) static bool js_extension_AssetsManagerEx_getDownloadedBytes(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getDownloadedBytes : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1005,13 +1005,13 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getDownloadedBytes) static bool js_extension_AssetsManagerEx_getLocalManifest(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getLocalManifest : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::extension::Manifest* result = cobj->getLocalManifest(); + const cc::extension::Manifest* result = cobj->getLocalManifest(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_getLocalManifest : Error processing arguments"); return true; @@ -1023,13 +1023,13 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getLocalManifest) static bool js_extension_AssetsManagerEx_getRemoteManifest(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getRemoteManifest : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::extension::Manifest* result = cobj->getRemoteManifest(); + const cc::extension::Manifest* result = cobj->getRemoteManifest(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_getRemoteManifest : Error processing arguments"); return true; @@ -1041,7 +1041,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_getRemoteManifest) static bool js_extension_AssetsManagerEx_prepareUpdate(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_prepareUpdate : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1056,7 +1056,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_prepareUpdate) static bool js_extension_AssetsManagerEx_downloadFailedAssets(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_downloadFailedAssets : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1071,7 +1071,7 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_downloadFailedAssets) static bool js_extension_AssetsManagerEx_isResuming(se::State& s) { - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_isResuming : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -1098,9 +1098,9 @@ static bool js_extension_AssetsManagerEx_create(se::State& s) ok &= seval_to_std_string(args[0], &arg0); ok &= seval_to_std_string(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_create : Error processing arguments"); - auto result = cocos2d::extension::AssetsManagerEx::create(arg0, arg1); + auto result = cc::extension::AssetsManagerEx::create(arg0, arg1); result->retain(); - auto obj = se::Object::createObjectWithClass(__jsb_cocos2d_extension_AssetsManagerEx_class); + auto obj = se::Object::createObjectWithClass(__jsb_cc_extension_AssetsManagerEx_class); obj->setPrivateData(result); s.rval().setObject(obj); return true; @@ -1110,7 +1110,7 @@ static bool js_extension_AssetsManagerEx_create(se::State& s) } SE_BIND_FUNC(js_extension_AssetsManagerEx_create) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_extension_AssetsManagerEx_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_extension_AssetsManagerEx_finalize) static bool js_extension_AssetsManagerEx_constructor(se::State& s) { @@ -1162,7 +1162,7 @@ static bool js_extension_AssetsManagerEx_constructor(se::State& s) } while(false) ; if (!ok) { ok = true; break; } - cocos2d::extension::AssetsManagerEx* cobj = JSB_ALLOC(cocos2d::extension::AssetsManagerEx, arg0, arg1, arg2); + cc::extension::AssetsManagerEx* cobj = JSB_ALLOC(cc::extension::AssetsManagerEx, arg0, arg1, arg2); s.thisObject()->setPrivateData(cobj); return true; } @@ -1175,7 +1175,7 @@ static bool js_extension_AssetsManagerEx_constructor(se::State& s) std::string arg1; ok &= seval_to_std_string(args[1], &arg1); if (!ok) { ok = true; break; } - cocos2d::extension::AssetsManagerEx* cobj = JSB_ALLOC(cocos2d::extension::AssetsManagerEx, arg0, arg1); + cc::extension::AssetsManagerEx* cobj = JSB_ALLOC(cc::extension::AssetsManagerEx, arg0, arg1); s.thisObject()->setPrivateData(cobj); return true; } @@ -1183,19 +1183,19 @@ static bool js_extension_AssetsManagerEx_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_extension_AssetsManagerEx_constructor, __jsb_cocos2d_extension_AssetsManagerEx_class, js_cocos2d_extension_AssetsManagerEx_finalize) +SE_BIND_CTOR(js_extension_AssetsManagerEx_constructor, __jsb_cc_extension_AssetsManagerEx_class, js_cc_extension_AssetsManagerEx_finalize) -static bool js_cocos2d_extension_AssetsManagerEx_finalize(se::State& s) +static bool js_cc_extension_AssetsManagerEx_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::extension::AssetsManagerEx)", s.nativeThisObject()); - cocos2d::extension::AssetsManagerEx* cobj = (cocos2d::extension::AssetsManagerEx*)s.nativeThisObject(); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::extension::AssetsManagerEx)", s.nativeThisObject()); + cc::extension::AssetsManagerEx* cobj = (cc::extension::AssetsManagerEx*)s.nativeThisObject(); cobj->release(); return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_extension_AssetsManagerEx_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_extension_AssetsManagerEx_finalize) bool js_register_extension_AssetsManagerEx(se::Object* obj) { @@ -1222,12 +1222,12 @@ bool js_register_extension_AssetsManagerEx(se::Object* obj) cls->defineFunction("downloadFailedAssets", _SE(js_extension_AssetsManagerEx_downloadFailedAssets)); cls->defineFunction("isResuming", _SE(js_extension_AssetsManagerEx_isResuming)); cls->defineStaticFunction("create", _SE(js_extension_AssetsManagerEx_create)); - cls->defineFinalizeFunction(_SE(js_cocos2d_extension_AssetsManagerEx_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_extension_AssetsManagerEx_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_extension_AssetsManagerEx_proto = cls->getProto(); - __jsb_cocos2d_extension_AssetsManagerEx_class = cls; + __jsb_cc_extension_AssetsManagerEx_proto = cls->getProto(); + __jsb_cc_extension_AssetsManagerEx_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp index d77cc119a5..4162799424 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp @@ -3,10 +3,10 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_extension_EventAssetsManagerEx_proto; -extern se::Class* __jsb_cocos2d_extension_EventAssetsManagerEx_class; +extern se::Object* __jsb_cc_extension_EventAssetsManagerEx_proto; +extern se::Class* __jsb_cc_extension_EventAssetsManagerEx_class; -bool js_register_cocos2d_extension_EventAssetsManagerEx(se::Object* obj); +bool js_register_cc_extension_EventAssetsManagerEx(se::Object* obj); bool register_all_extension(se::Object* obj); SE_DECLARE_FUNC(js_extension_EventAssetsManagerEx_getAssetsManagerEx); SE_DECLARE_FUNC(js_extension_EventAssetsManagerEx_getDownloadedFiles); @@ -23,10 +23,10 @@ SE_DECLARE_FUNC(js_extension_EventAssetsManagerEx_getPercent); SE_DECLARE_FUNC(js_extension_EventAssetsManagerEx_isResuming); SE_DECLARE_FUNC(js_extension_EventAssetsManagerEx_EventAssetsManagerEx); -extern se::Object* __jsb_cocos2d_extension_Manifest_proto; -extern se::Class* __jsb_cocos2d_extension_Manifest_class; +extern se::Object* __jsb_cc_extension_Manifest_proto; +extern se::Class* __jsb_cc_extension_Manifest_class; -bool js_register_cocos2d_extension_Manifest(se::Object* obj); +bool js_register_cc_extension_Manifest(se::Object* obj); bool register_all_extension(se::Object* obj); SE_DECLARE_FUNC(js_extension_Manifest_getManifestRoot); SE_DECLARE_FUNC(js_extension_Manifest_setUpdating); @@ -42,10 +42,10 @@ SE_DECLARE_FUNC(js_extension_Manifest_getVersionFileUrl); SE_DECLARE_FUNC(js_extension_Manifest_getSearchPaths); SE_DECLARE_FUNC(js_extension_Manifest_Manifest); -extern se::Object* __jsb_cocos2d_extension_AssetsManagerEx_proto; -extern se::Class* __jsb_cocos2d_extension_AssetsManagerEx_class; +extern se::Object* __jsb_cc_extension_AssetsManagerEx_proto; +extern se::Class* __jsb_cc_extension_AssetsManagerEx_class; -bool js_register_cocos2d_extension_AssetsManagerEx(se::Object* obj); +bool js_register_cc_extension_AssetsManagerEx(se::Object* obj); bool register_all_extension(se::Object* obj); SE_DECLARE_FUNC(js_extension_AssetsManagerEx_setVerifyCallback); SE_DECLARE_FUNC(js_extension_AssetsManagerEx_getDownloadedFiles); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.cpp index 764430ad3f..13a1d9e651 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.cpp @@ -11,25 +11,25 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_network_Downloader_proto = nullptr; -se::Class* __jsb_cocos2d_network_Downloader_class = nullptr; +se::Object* __jsb_cc_network_Downloader_proto = nullptr; +se::Class* __jsb_cc_network_Downloader_class = nullptr; static bool js_network_Downloader_setOnTaskProgress(se::State& s) { - cocos2d::network::Downloader* cobj = (cocos2d::network::Downloader*)s.nativeThisObject(); + cc::network::Downloader* cobj = (cc::network::Downloader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_network_Downloader_setOnTaskProgress : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - std::function arg0; + std::function arg0; do { if (args[0].isObject() && args[0].toObject()->isFunction()) { se::Value jsThis(s.thisObject()); se::Value jsFunc(args[0]); jsThis.toObject()->attachObject(jsFunc.toObject()); - auto lambda = [=](const cocos2d::network::DownloadTask & larg0, long long larg1, long long larg2, long long larg3) -> void { + auto lambda = [=](const cc::network::DownloadTask & larg0, long long larg1, long long larg2, long long larg3) -> void { se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; @@ -65,7 +65,7 @@ static bool js_network_Downloader_setOnTaskProgress(se::State& s) } SE_BIND_FUNC(js_network_Downloader_setOnTaskProgress) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_network_Downloader_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_network_Downloader_finalize) static bool js_network_Downloader_constructor(se::State& s) { @@ -74,10 +74,10 @@ static bool js_network_Downloader_constructor(se::State& s) size_t argc = args.size(); do { if (argc == 1) { - cocos2d::network::DownloaderHints arg0; + cc::network::DownloaderHints arg0; ok &= seval_to_DownloaderHints(args[0], &arg0); if (!ok) { ok = true; break; } - cocos2d::network::Downloader* cobj = JSB_ALLOC(cocos2d::network::Downloader, arg0); + cc::network::Downloader* cobj = JSB_ALLOC(cc::network::Downloader, arg0); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -85,7 +85,7 @@ static bool js_network_Downloader_constructor(se::State& s) } while(false); do { if (argc == 0) { - cocos2d::network::Downloader* cobj = JSB_ALLOC(cocos2d::network::Downloader); + cc::network::Downloader* cobj = JSB_ALLOC(cc::network::Downloader); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -94,36 +94,36 @@ static bool js_network_Downloader_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_network_Downloader_constructor, __jsb_cocos2d_network_Downloader_class, js_cocos2d_network_Downloader_finalize) +SE_BIND_CTOR(js_network_Downloader_constructor, __jsb_cc_network_Downloader_class, js_cc_network_Downloader_finalize) -static bool js_cocos2d_network_Downloader_finalize(se::State& s) +static bool js_cc_network_Downloader_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::network::Downloader)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::network::Downloader)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::network::Downloader* cobj = (cocos2d::network::Downloader*)s.nativeThisObject(); + cc::network::Downloader* cobj = (cc::network::Downloader*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_network_Downloader_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_network_Downloader_finalize) bool js_register_network_Downloader(se::Object* obj) { auto cls = se::Class::create("Downloader", obj, nullptr, _SE(js_network_Downloader_constructor)); cls->defineFunction("setOnTaskProgress", _SE(js_network_Downloader_setOnTaskProgress)); - cls->defineFinalizeFunction(_SE(js_cocos2d_network_Downloader_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_network_Downloader_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_network_Downloader_proto = cls->getProto(); - __jsb_cocos2d_network_Downloader_class = cls; + __jsb_cc_network_Downloader_proto = cls->getProto(); + __jsb_cc_network_Downloader_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.hpp index c150f2689b..84017e5ad0 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.hpp @@ -4,10 +4,10 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_network_Downloader_proto; -extern se::Class* __jsb_cocos2d_network_Downloader_class; +extern se::Object* __jsb_cc_network_Downloader_proto; +extern se::Class* __jsb_cc_network_Downloader_class; -bool js_register_cocos2d_network_Downloader(se::Object* obj); +bool js_register_cc_network_Downloader(se::Object* obj); bool register_all_network(se::Object* obj); SE_DECLARE_FUNC(js_network_Downloader_setOnTaskProgress); SE_DECLARE_FUNC(js_network_Downloader_Downloader); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_gfx_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_gfx_auto.cpp index 820ced04a7..5f8788d7d4 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_gfx_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_gfx_auto.cpp @@ -10,12 +10,12 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_GFXOffset_proto = nullptr; -se::Class* __jsb_cocos2d_GFXOffset_class = nullptr; +se::Object* __jsb_cc_GFXOffset_proto = nullptr; +se::Class* __jsb_cc_GFXOffset_class = nullptr; static bool js_gfx_GFXOffset_get_x(se::State& s) { - cocos2d::GFXOffset* cobj = (cocos2d::GFXOffset*)s.nativeThisObject(); + cc::GFXOffset* cobj = (cc::GFXOffset*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXOffset_get_x : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -29,7 +29,7 @@ SE_BIND_PROP_GET(js_gfx_GFXOffset_get_x) static bool js_gfx_GFXOffset_set_x(se::State& s) { const auto& args = s.args(); - cocos2d::GFXOffset* cobj = (cocos2d::GFXOffset*)s.nativeThisObject(); + cc::GFXOffset* cobj = (cc::GFXOffset*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXOffset_set_x : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -43,7 +43,7 @@ SE_BIND_PROP_SET(js_gfx_GFXOffset_set_x) static bool js_gfx_GFXOffset_get_y(se::State& s) { - cocos2d::GFXOffset* cobj = (cocos2d::GFXOffset*)s.nativeThisObject(); + cc::GFXOffset* cobj = (cc::GFXOffset*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXOffset_get_y : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -57,7 +57,7 @@ SE_BIND_PROP_GET(js_gfx_GFXOffset_get_y) static bool js_gfx_GFXOffset_set_y(se::State& s) { const auto& args = s.args(); - cocos2d::GFXOffset* cobj = (cocos2d::GFXOffset*)s.nativeThisObject(); + cc::GFXOffset* cobj = (cc::GFXOffset*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXOffset_set_y : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -71,7 +71,7 @@ SE_BIND_PROP_SET(js_gfx_GFXOffset_set_y) static bool js_gfx_GFXOffset_get_z(se::State& s) { - cocos2d::GFXOffset* cobj = (cocos2d::GFXOffset*)s.nativeThisObject(); + cc::GFXOffset* cobj = (cc::GFXOffset*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXOffset_get_z : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -85,7 +85,7 @@ SE_BIND_PROP_GET(js_gfx_GFXOffset_get_z) static bool js_gfx_GFXOffset_set_z(se::State& s) { const auto& args = s.args(); - cocos2d::GFXOffset* cobj = (cocos2d::GFXOffset*)s.nativeThisObject(); + cc::GFXOffset* cobj = (cc::GFXOffset*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXOffset_set_z : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -97,7 +97,7 @@ static bool js_gfx_GFXOffset_set_z(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXOffset_set_z) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXOffset_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXOffset_finalize) static bool js_gfx_GFXOffset_constructor(se::State& s) { @@ -107,7 +107,7 @@ static bool js_gfx_GFXOffset_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXOffset* cobj = JSB_ALLOC(cocos2d::GFXOffset); + cc::GFXOffset* cobj = JSB_ALLOC(cc::GFXOffset); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -117,7 +117,7 @@ static bool js_gfx_GFXOffset_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXOffset* cobj = JSB_ALLOC(cocos2d::GFXOffset); + cc::GFXOffset* cobj = JSB_ALLOC(cc::GFXOffset); int arg0 = 0; json->getProperty("x", &field); if(!field.isUndefined()) { @@ -149,7 +149,7 @@ static bool js_gfx_GFXOffset_constructor(se::State& s) } else if(argc == 3) { - cocos2d::GFXOffset* cobj = JSB_ALLOC(cocos2d::GFXOffset); + cc::GFXOffset* cobj = JSB_ALLOC(cc::GFXOffset); int arg0 = 0; if (!args[0].isUndefined()) { do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); @@ -180,24 +180,24 @@ static bool js_gfx_GFXOffset_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXOffset_constructor, __jsb_cocos2d_GFXOffset_class, js_cocos2d_GFXOffset_finalize) +SE_BIND_CTOR(js_gfx_GFXOffset_constructor, __jsb_cc_GFXOffset_class, js_cc_GFXOffset_finalize) -static bool js_cocos2d_GFXOffset_finalize(se::State& s) +static bool js_cc_GFXOffset_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXOffset)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXOffset)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXOffset* cobj = (cocos2d::GFXOffset*)s.nativeThisObject(); + cc::GFXOffset* cobj = (cc::GFXOffset*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXOffset_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXOffset_finalize) bool js_register_gfx_GFXOffset(se::Object* obj) { @@ -206,23 +206,23 @@ bool js_register_gfx_GFXOffset(se::Object* obj) cls->defineProperty("x", _SE(js_gfx_GFXOffset_get_x), _SE(js_gfx_GFXOffset_set_x)); cls->defineProperty("y", _SE(js_gfx_GFXOffset_get_y), _SE(js_gfx_GFXOffset_set_y)); cls->defineProperty("z", _SE(js_gfx_GFXOffset_get_z), _SE(js_gfx_GFXOffset_set_z)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXOffset_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXOffset_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXOffset_proto = cls->getProto(); - __jsb_cocos2d_GFXOffset_class = cls; + __jsb_cc_GFXOffset_proto = cls->getProto(); + __jsb_cc_GFXOffset_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXRect_proto = nullptr; -se::Class* __jsb_cocos2d_GFXRect_class = nullptr; +se::Object* __jsb_cc_GFXRect_proto = nullptr; +se::Class* __jsb_cc_GFXRect_class = nullptr; static bool js_gfx_GFXRect_get_x(se::State& s) { - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRect_get_x : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -236,7 +236,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRect_get_x) static bool js_gfx_GFXRect_set_x(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRect_set_x : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -250,7 +250,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRect_set_x) static bool js_gfx_GFXRect_get_y(se::State& s) { - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRect_get_y : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -264,7 +264,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRect_get_y) static bool js_gfx_GFXRect_set_y(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRect_set_y : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -278,7 +278,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRect_set_y) static bool js_gfx_GFXRect_get_width(se::State& s) { - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRect_get_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -292,7 +292,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRect_get_width) static bool js_gfx_GFXRect_set_width(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRect_set_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -306,7 +306,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRect_set_width) static bool js_gfx_GFXRect_get_height(se::State& s) { - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRect_get_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -320,7 +320,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRect_get_height) static bool js_gfx_GFXRect_set_height(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRect_set_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -332,7 +332,7 @@ static bool js_gfx_GFXRect_set_height(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXRect_set_height) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXRect_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXRect_finalize) static bool js_gfx_GFXRect_constructor(se::State& s) { @@ -342,7 +342,7 @@ static bool js_gfx_GFXRect_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXRect* cobj = JSB_ALLOC(cocos2d::GFXRect); + cc::GFXRect* cobj = JSB_ALLOC(cc::GFXRect); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -352,7 +352,7 @@ static bool js_gfx_GFXRect_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXRect* cobj = JSB_ALLOC(cocos2d::GFXRect); + cc::GFXRect* cobj = JSB_ALLOC(cc::GFXRect); int arg0 = 0; json->getProperty("x", &field); if(!field.isUndefined()) { @@ -390,7 +390,7 @@ static bool js_gfx_GFXRect_constructor(se::State& s) } else if(argc == 4) { - cocos2d::GFXRect* cobj = JSB_ALLOC(cocos2d::GFXRect); + cc::GFXRect* cobj = JSB_ALLOC(cc::GFXRect); int arg0 = 0; if (!args[0].isUndefined()) { do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); @@ -426,24 +426,24 @@ static bool js_gfx_GFXRect_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXRect_constructor, __jsb_cocos2d_GFXRect_class, js_cocos2d_GFXRect_finalize) +SE_BIND_CTOR(js_gfx_GFXRect_constructor, __jsb_cc_GFXRect_class, js_cc_GFXRect_finalize) -static bool js_cocos2d_GFXRect_finalize(se::State& s) +static bool js_cc_GFXRect_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXRect)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXRect)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXRect* cobj = (cocos2d::GFXRect*)s.nativeThisObject(); + cc::GFXRect* cobj = (cc::GFXRect*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXRect_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXRect_finalize) bool js_register_gfx_GFXRect(se::Object* obj) { @@ -453,23 +453,23 @@ bool js_register_gfx_GFXRect(se::Object* obj) cls->defineProperty("y", _SE(js_gfx_GFXRect_get_y), _SE(js_gfx_GFXRect_set_y)); cls->defineProperty("width", _SE(js_gfx_GFXRect_get_width), _SE(js_gfx_GFXRect_set_width)); cls->defineProperty("height", _SE(js_gfx_GFXRect_get_height), _SE(js_gfx_GFXRect_set_height)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXRect_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXRect_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXRect_proto = cls->getProto(); - __jsb_cocos2d_GFXRect_class = cls; + __jsb_cc_GFXRect_proto = cls->getProto(); + __jsb_cc_GFXRect_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXExtent_proto = nullptr; -se::Class* __jsb_cocos2d_GFXExtent_class = nullptr; +se::Object* __jsb_cc_GFXExtent_proto = nullptr; +se::Class* __jsb_cc_GFXExtent_class = nullptr; static bool js_gfx_GFXExtent_get_width(se::State& s) { - cocos2d::GFXExtent* cobj = (cocos2d::GFXExtent*)s.nativeThisObject(); + cc::GFXExtent* cobj = (cc::GFXExtent*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXExtent_get_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -483,7 +483,7 @@ SE_BIND_PROP_GET(js_gfx_GFXExtent_get_width) static bool js_gfx_GFXExtent_set_width(se::State& s) { const auto& args = s.args(); - cocos2d::GFXExtent* cobj = (cocos2d::GFXExtent*)s.nativeThisObject(); + cc::GFXExtent* cobj = (cc::GFXExtent*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXExtent_set_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -497,7 +497,7 @@ SE_BIND_PROP_SET(js_gfx_GFXExtent_set_width) static bool js_gfx_GFXExtent_get_height(se::State& s) { - cocos2d::GFXExtent* cobj = (cocos2d::GFXExtent*)s.nativeThisObject(); + cc::GFXExtent* cobj = (cc::GFXExtent*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXExtent_get_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -511,7 +511,7 @@ SE_BIND_PROP_GET(js_gfx_GFXExtent_get_height) static bool js_gfx_GFXExtent_set_height(se::State& s) { const auto& args = s.args(); - cocos2d::GFXExtent* cobj = (cocos2d::GFXExtent*)s.nativeThisObject(); + cc::GFXExtent* cobj = (cc::GFXExtent*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXExtent_set_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -525,7 +525,7 @@ SE_BIND_PROP_SET(js_gfx_GFXExtent_set_height) static bool js_gfx_GFXExtent_get_depth(se::State& s) { - cocos2d::GFXExtent* cobj = (cocos2d::GFXExtent*)s.nativeThisObject(); + cc::GFXExtent* cobj = (cc::GFXExtent*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXExtent_get_depth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -539,7 +539,7 @@ SE_BIND_PROP_GET(js_gfx_GFXExtent_get_depth) static bool js_gfx_GFXExtent_set_depth(se::State& s) { const auto& args = s.args(); - cocos2d::GFXExtent* cobj = (cocos2d::GFXExtent*)s.nativeThisObject(); + cc::GFXExtent* cobj = (cc::GFXExtent*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXExtent_set_depth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -551,7 +551,7 @@ static bool js_gfx_GFXExtent_set_depth(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXExtent_set_depth) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXExtent_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXExtent_finalize) static bool js_gfx_GFXExtent_constructor(se::State& s) { @@ -561,7 +561,7 @@ static bool js_gfx_GFXExtent_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXExtent* cobj = JSB_ALLOC(cocos2d::GFXExtent); + cc::GFXExtent* cobj = JSB_ALLOC(cc::GFXExtent); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -571,7 +571,7 @@ static bool js_gfx_GFXExtent_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXExtent* cobj = JSB_ALLOC(cocos2d::GFXExtent); + cc::GFXExtent* cobj = JSB_ALLOC(cc::GFXExtent); unsigned int arg0 = 0; json->getProperty("width", &field); if(!field.isUndefined()) { @@ -603,7 +603,7 @@ static bool js_gfx_GFXExtent_constructor(se::State& s) } else if(argc == 3) { - cocos2d::GFXExtent* cobj = JSB_ALLOC(cocos2d::GFXExtent); + cc::GFXExtent* cobj = JSB_ALLOC(cc::GFXExtent); unsigned int arg0 = 0; if (!args[0].isUndefined()) { ok &= seval_to_uint32(args[0], (uint32_t*)&arg0); @@ -634,24 +634,24 @@ static bool js_gfx_GFXExtent_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXExtent_constructor, __jsb_cocos2d_GFXExtent_class, js_cocos2d_GFXExtent_finalize) +SE_BIND_CTOR(js_gfx_GFXExtent_constructor, __jsb_cc_GFXExtent_class, js_cc_GFXExtent_finalize) -static bool js_cocos2d_GFXExtent_finalize(se::State& s) +static bool js_cc_GFXExtent_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXExtent)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXExtent)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXExtent* cobj = (cocos2d::GFXExtent*)s.nativeThisObject(); + cc::GFXExtent* cobj = (cc::GFXExtent*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXExtent_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXExtent_finalize) bool js_register_gfx_GFXExtent(se::Object* obj) { @@ -660,23 +660,23 @@ bool js_register_gfx_GFXExtent(se::Object* obj) cls->defineProperty("width", _SE(js_gfx_GFXExtent_get_width), _SE(js_gfx_GFXExtent_set_width)); cls->defineProperty("height", _SE(js_gfx_GFXExtent_get_height), _SE(js_gfx_GFXExtent_set_height)); cls->defineProperty("depth", _SE(js_gfx_GFXExtent_get_depth), _SE(js_gfx_GFXExtent_set_depth)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXExtent_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXExtent_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXExtent_proto = cls->getProto(); - __jsb_cocos2d_GFXExtent_class = cls; + __jsb_cc_GFXExtent_proto = cls->getProto(); + __jsb_cc_GFXExtent_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXTextureSubres_proto = nullptr; -se::Class* __jsb_cocos2d_GFXTextureSubres_class = nullptr; +se::Object* __jsb_cc_GFXTextureSubres_proto = nullptr; +se::Class* __jsb_cc_GFXTextureSubres_class = nullptr; static bool js_gfx_GFXTextureSubres_get_mipLevel(se::State& s) { - cocos2d::GFXTextureSubres* cobj = (cocos2d::GFXTextureSubres*)s.nativeThisObject(); + cc::GFXTextureSubres* cobj = (cc::GFXTextureSubres*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureSubres_get_mipLevel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -690,7 +690,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureSubres_get_mipLevel) static bool js_gfx_GFXTextureSubres_set_mipLevel(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureSubres* cobj = (cocos2d::GFXTextureSubres*)s.nativeThisObject(); + cc::GFXTextureSubres* cobj = (cc::GFXTextureSubres*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureSubres_set_mipLevel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -704,7 +704,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureSubres_set_mipLevel) static bool js_gfx_GFXTextureSubres_get_baseArrayLayer(se::State& s) { - cocos2d::GFXTextureSubres* cobj = (cocos2d::GFXTextureSubres*)s.nativeThisObject(); + cc::GFXTextureSubres* cobj = (cc::GFXTextureSubres*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureSubres_get_baseArrayLayer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -718,7 +718,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureSubres_get_baseArrayLayer) static bool js_gfx_GFXTextureSubres_set_baseArrayLayer(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureSubres* cobj = (cocos2d::GFXTextureSubres*)s.nativeThisObject(); + cc::GFXTextureSubres* cobj = (cc::GFXTextureSubres*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureSubres_set_baseArrayLayer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -732,7 +732,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureSubres_set_baseArrayLayer) static bool js_gfx_GFXTextureSubres_get_layerCount(se::State& s) { - cocos2d::GFXTextureSubres* cobj = (cocos2d::GFXTextureSubres*)s.nativeThisObject(); + cc::GFXTextureSubres* cobj = (cc::GFXTextureSubres*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureSubres_get_layerCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -746,7 +746,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureSubres_get_layerCount) static bool js_gfx_GFXTextureSubres_set_layerCount(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureSubres* cobj = (cocos2d::GFXTextureSubres*)s.nativeThisObject(); + cc::GFXTextureSubres* cobj = (cc::GFXTextureSubres*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureSubres_set_layerCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -758,7 +758,7 @@ static bool js_gfx_GFXTextureSubres_set_layerCount(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXTextureSubres_set_layerCount) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXTextureSubres_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXTextureSubres_finalize) static bool js_gfx_GFXTextureSubres_constructor(se::State& s) { @@ -768,7 +768,7 @@ static bool js_gfx_GFXTextureSubres_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXTextureSubres* cobj = JSB_ALLOC(cocos2d::GFXTextureSubres); + cc::GFXTextureSubres* cobj = JSB_ALLOC(cc::GFXTextureSubres); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -778,7 +778,7 @@ static bool js_gfx_GFXTextureSubres_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXTextureSubres* cobj = JSB_ALLOC(cocos2d::GFXTextureSubres); + cc::GFXTextureSubres* cobj = JSB_ALLOC(cc::GFXTextureSubres); unsigned int arg0 = 0; json->getProperty("mipLevel", &field); if(!field.isUndefined()) { @@ -810,7 +810,7 @@ static bool js_gfx_GFXTextureSubres_constructor(se::State& s) } else if(argc == 3) { - cocos2d::GFXTextureSubres* cobj = JSB_ALLOC(cocos2d::GFXTextureSubres); + cc::GFXTextureSubres* cobj = JSB_ALLOC(cc::GFXTextureSubres); unsigned int arg0 = 0; if (!args[0].isUndefined()) { ok &= seval_to_uint32(args[0], (uint32_t*)&arg0); @@ -841,24 +841,24 @@ static bool js_gfx_GFXTextureSubres_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXTextureSubres_constructor, __jsb_cocos2d_GFXTextureSubres_class, js_cocos2d_GFXTextureSubres_finalize) +SE_BIND_CTOR(js_gfx_GFXTextureSubres_constructor, __jsb_cc_GFXTextureSubres_class, js_cc_GFXTextureSubres_finalize) -static bool js_cocos2d_GFXTextureSubres_finalize(se::State& s) +static bool js_cc_GFXTextureSubres_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXTextureSubres)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXTextureSubres)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXTextureSubres* cobj = (cocos2d::GFXTextureSubres*)s.nativeThisObject(); + cc::GFXTextureSubres* cobj = (cc::GFXTextureSubres*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXTextureSubres_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXTextureSubres_finalize) bool js_register_gfx_GFXTextureSubres(se::Object* obj) { @@ -867,23 +867,23 @@ bool js_register_gfx_GFXTextureSubres(se::Object* obj) cls->defineProperty("mipLevel", _SE(js_gfx_GFXTextureSubres_get_mipLevel), _SE(js_gfx_GFXTextureSubres_set_mipLevel)); cls->defineProperty("baseArrayLayer", _SE(js_gfx_GFXTextureSubres_get_baseArrayLayer), _SE(js_gfx_GFXTextureSubres_set_baseArrayLayer)); cls->defineProperty("layerCount", _SE(js_gfx_GFXTextureSubres_get_layerCount), _SE(js_gfx_GFXTextureSubres_set_layerCount)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXTextureSubres_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXTextureSubres_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXTextureSubres_proto = cls->getProto(); - __jsb_cocos2d_GFXTextureSubres_class = cls; + __jsb_cc_GFXTextureSubres_proto = cls->getProto(); + __jsb_cc_GFXTextureSubres_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXTextureCopy_proto = nullptr; -se::Class* __jsb_cocos2d_GFXTextureCopy_class = nullptr; +se::Object* __jsb_cc_GFXTextureCopy_proto = nullptr; +se::Class* __jsb_cc_GFXTextureCopy_class = nullptr; static bool js_gfx_GFXTextureCopy_get_srcSubres(se::State& s) { - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_get_srcSubres : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -897,11 +897,11 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureCopy_get_srcSubres) static bool js_gfx_GFXTextureCopy_set_srcSubres(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_set_srcSubres : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureSubres* arg0 = nullptr; + cc::GFXTextureSubres* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureCopy_set_srcSubres : Error processing new value"); cobj->srcSubres = *arg0; @@ -911,7 +911,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureCopy_set_srcSubres) static bool js_gfx_GFXTextureCopy_get_srcOffset(se::State& s) { - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_get_srcOffset : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -925,11 +925,11 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureCopy_get_srcOffset) static bool js_gfx_GFXTextureCopy_set_srcOffset(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_set_srcOffset : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXOffset* arg0 = nullptr; + cc::GFXOffset* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureCopy_set_srcOffset : Error processing new value"); cobj->srcOffset = *arg0; @@ -939,7 +939,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureCopy_set_srcOffset) static bool js_gfx_GFXTextureCopy_get_dstSubres(se::State& s) { - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_get_dstSubres : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -953,11 +953,11 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureCopy_get_dstSubres) static bool js_gfx_GFXTextureCopy_set_dstSubres(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_set_dstSubres : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureSubres* arg0 = nullptr; + cc::GFXTextureSubres* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureCopy_set_dstSubres : Error processing new value"); cobj->dstSubres = *arg0; @@ -967,7 +967,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureCopy_set_dstSubres) static bool js_gfx_GFXTextureCopy_get_dstOffset(se::State& s) { - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_get_dstOffset : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -981,11 +981,11 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureCopy_get_dstOffset) static bool js_gfx_GFXTextureCopy_set_dstOffset(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_set_dstOffset : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXOffset* arg0 = nullptr; + cc::GFXOffset* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureCopy_set_dstOffset : Error processing new value"); cobj->dstOffset = *arg0; @@ -995,7 +995,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureCopy_set_dstOffset) static bool js_gfx_GFXTextureCopy_get_extent(se::State& s) { - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_get_extent : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1009,11 +1009,11 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureCopy_get_extent) static bool js_gfx_GFXTextureCopy_set_extent(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureCopy_set_extent : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXExtent* arg0 = nullptr; + cc::GFXExtent* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureCopy_set_extent : Error processing new value"); cobj->extent = *arg0; @@ -1021,7 +1021,7 @@ static bool js_gfx_GFXTextureCopy_set_extent(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXTextureCopy_set_extent) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXTextureCopy_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXTextureCopy_finalize) static bool js_gfx_GFXTextureCopy_constructor(se::State& s) { @@ -1031,7 +1031,7 @@ static bool js_gfx_GFXTextureCopy_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXTextureCopy* cobj = JSB_ALLOC(cocos2d::GFXTextureCopy); + cc::GFXTextureCopy* cobj = JSB_ALLOC(cc::GFXTextureCopy); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -1041,32 +1041,32 @@ static bool js_gfx_GFXTextureCopy_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXTextureCopy* cobj = JSB_ALLOC(cocos2d::GFXTextureCopy); - cocos2d::GFXTextureSubres* arg0 = nullptr; + cc::GFXTextureCopy* cobj = JSB_ALLOC(cc::GFXTextureCopy); + cc::GFXTextureSubres* arg0 = nullptr; json->getProperty("srcSubres", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg0); cobj->srcSubres = *arg0; } - cocos2d::GFXOffset* arg1 = nullptr; + cc::GFXOffset* arg1 = nullptr; json->getProperty("srcOffset", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg1); cobj->srcOffset = *arg1; } - cocos2d::GFXTextureSubres* arg2 = nullptr; + cc::GFXTextureSubres* arg2 = nullptr; json->getProperty("dstSubres", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg2); cobj->dstSubres = *arg2; } - cocos2d::GFXOffset* arg3 = nullptr; + cc::GFXOffset* arg3 = nullptr; json->getProperty("dstOffset", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg3); cobj->dstOffset = *arg3; } - cocos2d::GFXExtent* arg4 = nullptr; + cc::GFXExtent* arg4 = nullptr; json->getProperty("extent", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg4); @@ -1085,28 +1085,28 @@ static bool js_gfx_GFXTextureCopy_constructor(se::State& s) } else if(argc == 5) { - cocos2d::GFXTextureCopy* cobj = JSB_ALLOC(cocos2d::GFXTextureCopy); - cocos2d::GFXTextureSubres* arg0 = nullptr; + cc::GFXTextureCopy* cobj = JSB_ALLOC(cc::GFXTextureCopy); + cc::GFXTextureSubres* arg0 = nullptr; if (!args[0].isUndefined()) { ok &= seval_to_reference(args[0], &arg0); cobj->srcSubres = *arg0; } - cocos2d::GFXOffset* arg1 = nullptr; + cc::GFXOffset* arg1 = nullptr; if (!args[1].isUndefined()) { ok &= seval_to_reference(args[1], &arg1); cobj->srcOffset = *arg1; } - cocos2d::GFXTextureSubres* arg2 = nullptr; + cc::GFXTextureSubres* arg2 = nullptr; if (!args[2].isUndefined()) { ok &= seval_to_reference(args[2], &arg2); cobj->dstSubres = *arg2; } - cocos2d::GFXOffset* arg3 = nullptr; + cc::GFXOffset* arg3 = nullptr; if (!args[3].isUndefined()) { ok &= seval_to_reference(args[3], &arg3); cobj->dstOffset = *arg3; } - cocos2d::GFXExtent* arg4 = nullptr; + cc::GFXExtent* arg4 = nullptr; if (!args[4].isUndefined()) { ok &= seval_to_reference(args[4], &arg4); cobj->extent = *arg4; @@ -1126,24 +1126,24 @@ static bool js_gfx_GFXTextureCopy_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXTextureCopy_constructor, __jsb_cocos2d_GFXTextureCopy_class, js_cocos2d_GFXTextureCopy_finalize) +SE_BIND_CTOR(js_gfx_GFXTextureCopy_constructor, __jsb_cc_GFXTextureCopy_class, js_cc_GFXTextureCopy_finalize) -static bool js_cocos2d_GFXTextureCopy_finalize(se::State& s) +static bool js_cc_GFXTextureCopy_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXTextureCopy)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXTextureCopy)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXTextureCopy* cobj = (cocos2d::GFXTextureCopy*)s.nativeThisObject(); + cc::GFXTextureCopy* cobj = (cc::GFXTextureCopy*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXTextureCopy_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXTextureCopy_finalize) bool js_register_gfx_GFXTextureCopy(se::Object* obj) { @@ -1154,23 +1154,23 @@ bool js_register_gfx_GFXTextureCopy(se::Object* obj) cls->defineProperty("dstSubres", _SE(js_gfx_GFXTextureCopy_get_dstSubres), _SE(js_gfx_GFXTextureCopy_set_dstSubres)); cls->defineProperty("dstOffset", _SE(js_gfx_GFXTextureCopy_get_dstOffset), _SE(js_gfx_GFXTextureCopy_set_dstOffset)); cls->defineProperty("extent", _SE(js_gfx_GFXTextureCopy_get_extent), _SE(js_gfx_GFXTextureCopy_set_extent)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXTextureCopy_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXTextureCopy_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXTextureCopy_proto = cls->getProto(); - __jsb_cocos2d_GFXTextureCopy_class = cls; + __jsb_cc_GFXTextureCopy_proto = cls->getProto(); + __jsb_cc_GFXTextureCopy_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBufferTextureCopy_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBufferTextureCopy_class = nullptr; +se::Object* __jsb_cc_GFXBufferTextureCopy_proto = nullptr; +se::Class* __jsb_cc_GFXBufferTextureCopy_class = nullptr; static bool js_gfx_GFXBufferTextureCopy_get_buffStride(se::State& s) { - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_get_buffStride : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1184,7 +1184,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferTextureCopy_get_buffStride) static bool js_gfx_GFXBufferTextureCopy_set_buffStride(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_set_buffStride : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1198,7 +1198,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBufferTextureCopy_set_buffStride) static bool js_gfx_GFXBufferTextureCopy_get_buffTexHeight(se::State& s) { - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_get_buffTexHeight : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1212,7 +1212,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferTextureCopy_get_buffTexHeight) static bool js_gfx_GFXBufferTextureCopy_set_buffTexHeight(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_set_buffTexHeight : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1226,7 +1226,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBufferTextureCopy_set_buffTexHeight) static bool js_gfx_GFXBufferTextureCopy_get_texOffset(se::State& s) { - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_get_texOffset : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1240,11 +1240,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferTextureCopy_get_texOffset) static bool js_gfx_GFXBufferTextureCopy_set_texOffset(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_set_texOffset : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXOffset* arg0 = nullptr; + cc::GFXOffset* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBufferTextureCopy_set_texOffset : Error processing new value"); cobj->texOffset = *arg0; @@ -1254,7 +1254,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBufferTextureCopy_set_texOffset) static bool js_gfx_GFXBufferTextureCopy_get_texExtent(se::State& s) { - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_get_texExtent : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1268,11 +1268,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferTextureCopy_get_texExtent) static bool js_gfx_GFXBufferTextureCopy_set_texExtent(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_set_texExtent : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXExtent* arg0 = nullptr; + cc::GFXExtent* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBufferTextureCopy_set_texExtent : Error processing new value"); cobj->texExtent = *arg0; @@ -1282,7 +1282,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBufferTextureCopy_set_texExtent) static bool js_gfx_GFXBufferTextureCopy_get_texSubres(se::State& s) { - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_get_texSubres : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1296,11 +1296,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferTextureCopy_get_texSubres) static bool js_gfx_GFXBufferTextureCopy_set_texSubres(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferTextureCopy_set_texSubres : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureSubres* arg0 = nullptr; + cc::GFXTextureSubres* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBufferTextureCopy_set_texSubres : Error processing new value"); cobj->texSubres = *arg0; @@ -1308,7 +1308,7 @@ static bool js_gfx_GFXBufferTextureCopy_set_texSubres(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXBufferTextureCopy_set_texSubres) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBufferTextureCopy_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBufferTextureCopy_finalize) static bool js_gfx_GFXBufferTextureCopy_constructor(se::State& s) { @@ -1318,7 +1318,7 @@ static bool js_gfx_GFXBufferTextureCopy_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXBufferTextureCopy* cobj = JSB_ALLOC(cocos2d::GFXBufferTextureCopy); + cc::GFXBufferTextureCopy* cobj = JSB_ALLOC(cc::GFXBufferTextureCopy); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -1328,7 +1328,7 @@ static bool js_gfx_GFXBufferTextureCopy_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXBufferTextureCopy* cobj = JSB_ALLOC(cocos2d::GFXBufferTextureCopy); + cc::GFXBufferTextureCopy* cobj = JSB_ALLOC(cc::GFXBufferTextureCopy); unsigned int arg0 = 0; json->getProperty("buffStride", &field); if(!field.isUndefined()) { @@ -1341,19 +1341,19 @@ static bool js_gfx_GFXBufferTextureCopy_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg1); cobj->buffTexHeight = arg1; } - cocos2d::GFXOffset* arg2 = nullptr; + cc::GFXOffset* arg2 = nullptr; json->getProperty("texOffset", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg2); cobj->texOffset = *arg2; } - cocos2d::GFXExtent* arg3 = nullptr; + cc::GFXExtent* arg3 = nullptr; json->getProperty("texExtent", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg3); cobj->texExtent = *arg3; } - cocos2d::GFXTextureSubres* arg4 = nullptr; + cc::GFXTextureSubres* arg4 = nullptr; json->getProperty("texSubres", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg4); @@ -1372,7 +1372,7 @@ static bool js_gfx_GFXBufferTextureCopy_constructor(se::State& s) } else if(argc == 5) { - cocos2d::GFXBufferTextureCopy* cobj = JSB_ALLOC(cocos2d::GFXBufferTextureCopy); + cc::GFXBufferTextureCopy* cobj = JSB_ALLOC(cc::GFXBufferTextureCopy); unsigned int arg0 = 0; if (!args[0].isUndefined()) { ok &= seval_to_uint32(args[0], (uint32_t*)&arg0); @@ -1383,17 +1383,17 @@ static bool js_gfx_GFXBufferTextureCopy_constructor(se::State& s) ok &= seval_to_uint32(args[1], (uint32_t*)&arg1); cobj->buffTexHeight = arg1; } - cocos2d::GFXOffset* arg2 = nullptr; + cc::GFXOffset* arg2 = nullptr; if (!args[2].isUndefined()) { ok &= seval_to_reference(args[2], &arg2); cobj->texOffset = *arg2; } - cocos2d::GFXExtent* arg3 = nullptr; + cc::GFXExtent* arg3 = nullptr; if (!args[3].isUndefined()) { ok &= seval_to_reference(args[3], &arg3); cobj->texExtent = *arg3; } - cocos2d::GFXTextureSubres* arg4 = nullptr; + cc::GFXTextureSubres* arg4 = nullptr; if (!args[4].isUndefined()) { ok &= seval_to_reference(args[4], &arg4); cobj->texSubres = *arg4; @@ -1413,24 +1413,24 @@ static bool js_gfx_GFXBufferTextureCopy_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXBufferTextureCopy_constructor, __jsb_cocos2d_GFXBufferTextureCopy_class, js_cocos2d_GFXBufferTextureCopy_finalize) +SE_BIND_CTOR(js_gfx_GFXBufferTextureCopy_constructor, __jsb_cc_GFXBufferTextureCopy_class, js_cc_GFXBufferTextureCopy_finalize) -static bool js_cocos2d_GFXBufferTextureCopy_finalize(se::State& s) +static bool js_cc_GFXBufferTextureCopy_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBufferTextureCopy)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBufferTextureCopy)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBufferTextureCopy* cobj = (cocos2d::GFXBufferTextureCopy*)s.nativeThisObject(); + cc::GFXBufferTextureCopy* cobj = (cc::GFXBufferTextureCopy*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBufferTextureCopy_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBufferTextureCopy_finalize) bool js_register_gfx_GFXBufferTextureCopy(se::Object* obj) { @@ -1441,23 +1441,23 @@ bool js_register_gfx_GFXBufferTextureCopy(se::Object* obj) cls->defineProperty("texOffset", _SE(js_gfx_GFXBufferTextureCopy_get_texOffset), _SE(js_gfx_GFXBufferTextureCopy_set_texOffset)); cls->defineProperty("texExtent", _SE(js_gfx_GFXBufferTextureCopy_get_texExtent), _SE(js_gfx_GFXBufferTextureCopy_set_texExtent)); cls->defineProperty("texSubres", _SE(js_gfx_GFXBufferTextureCopy_get_texSubres), _SE(js_gfx_GFXBufferTextureCopy_set_texSubres)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBufferTextureCopy_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBufferTextureCopy_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBufferTextureCopy_proto = cls->getProto(); - __jsb_cocos2d_GFXBufferTextureCopy_class = cls; + __jsb_cc_GFXBufferTextureCopy_proto = cls->getProto(); + __jsb_cc_GFXBufferTextureCopy_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXViewport_proto = nullptr; -se::Class* __jsb_cocos2d_GFXViewport_class = nullptr; +se::Object* __jsb_cc_GFXViewport_proto = nullptr; +se::Class* __jsb_cc_GFXViewport_class = nullptr; static bool js_gfx_GFXViewport_get_left(se::State& s) { - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_get_left : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1471,7 +1471,7 @@ SE_BIND_PROP_GET(js_gfx_GFXViewport_get_left) static bool js_gfx_GFXViewport_set_left(se::State& s) { const auto& args = s.args(); - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_set_left : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1485,7 +1485,7 @@ SE_BIND_PROP_SET(js_gfx_GFXViewport_set_left) static bool js_gfx_GFXViewport_get_top(se::State& s) { - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_get_top : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1499,7 +1499,7 @@ SE_BIND_PROP_GET(js_gfx_GFXViewport_get_top) static bool js_gfx_GFXViewport_set_top(se::State& s) { const auto& args = s.args(); - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_set_top : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1513,7 +1513,7 @@ SE_BIND_PROP_SET(js_gfx_GFXViewport_set_top) static bool js_gfx_GFXViewport_get_width(se::State& s) { - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_get_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1527,7 +1527,7 @@ SE_BIND_PROP_GET(js_gfx_GFXViewport_get_width) static bool js_gfx_GFXViewport_set_width(se::State& s) { const auto& args = s.args(); - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_set_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1541,7 +1541,7 @@ SE_BIND_PROP_SET(js_gfx_GFXViewport_set_width) static bool js_gfx_GFXViewport_get_height(se::State& s) { - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_get_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1555,7 +1555,7 @@ SE_BIND_PROP_GET(js_gfx_GFXViewport_get_height) static bool js_gfx_GFXViewport_set_height(se::State& s) { const auto& args = s.args(); - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_set_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1569,7 +1569,7 @@ SE_BIND_PROP_SET(js_gfx_GFXViewport_set_height) static bool js_gfx_GFXViewport_get_minDepth(se::State& s) { - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_get_minDepth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1583,7 +1583,7 @@ SE_BIND_PROP_GET(js_gfx_GFXViewport_get_minDepth) static bool js_gfx_GFXViewport_set_minDepth(se::State& s) { const auto& args = s.args(); - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_set_minDepth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1597,7 +1597,7 @@ SE_BIND_PROP_SET(js_gfx_GFXViewport_set_minDepth) static bool js_gfx_GFXViewport_get_maxDepth(se::State& s) { - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_get_maxDepth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1611,7 +1611,7 @@ SE_BIND_PROP_GET(js_gfx_GFXViewport_get_maxDepth) static bool js_gfx_GFXViewport_set_maxDepth(se::State& s) { const auto& args = s.args(); - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXViewport_set_maxDepth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1623,7 +1623,7 @@ static bool js_gfx_GFXViewport_set_maxDepth(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXViewport_set_maxDepth) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXViewport_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXViewport_finalize) static bool js_gfx_GFXViewport_constructor(se::State& s) { @@ -1633,7 +1633,7 @@ static bool js_gfx_GFXViewport_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXViewport* cobj = JSB_ALLOC(cocos2d::GFXViewport); + cc::GFXViewport* cobj = JSB_ALLOC(cc::GFXViewport); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -1643,7 +1643,7 @@ static bool js_gfx_GFXViewport_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXViewport* cobj = JSB_ALLOC(cocos2d::GFXViewport); + cc::GFXViewport* cobj = JSB_ALLOC(cc::GFXViewport); int arg0 = 0; json->getProperty("left", &field); if(!field.isUndefined()) { @@ -1693,7 +1693,7 @@ static bool js_gfx_GFXViewport_constructor(se::State& s) } else if(argc == 6) { - cocos2d::GFXViewport* cobj = JSB_ALLOC(cocos2d::GFXViewport); + cc::GFXViewport* cobj = JSB_ALLOC(cc::GFXViewport); int arg0 = 0; if (!args[0].isUndefined()) { do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (int)tmp; } while(false); @@ -1739,24 +1739,24 @@ static bool js_gfx_GFXViewport_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXViewport_constructor, __jsb_cocos2d_GFXViewport_class, js_cocos2d_GFXViewport_finalize) +SE_BIND_CTOR(js_gfx_GFXViewport_constructor, __jsb_cc_GFXViewport_class, js_cc_GFXViewport_finalize) -static bool js_cocos2d_GFXViewport_finalize(se::State& s) +static bool js_cc_GFXViewport_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXViewport)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXViewport)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXViewport* cobj = (cocos2d::GFXViewport*)s.nativeThisObject(); + cc::GFXViewport* cobj = (cc::GFXViewport*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXViewport_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXViewport_finalize) bool js_register_gfx_GFXViewport(se::Object* obj) { @@ -1768,23 +1768,23 @@ bool js_register_gfx_GFXViewport(se::Object* obj) cls->defineProperty("height", _SE(js_gfx_GFXViewport_get_height), _SE(js_gfx_GFXViewport_set_height)); cls->defineProperty("minDepth", _SE(js_gfx_GFXViewport_get_minDepth), _SE(js_gfx_GFXViewport_set_minDepth)); cls->defineProperty("maxDepth", _SE(js_gfx_GFXViewport_get_maxDepth), _SE(js_gfx_GFXViewport_set_maxDepth)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXViewport_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXViewport_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXViewport_proto = cls->getProto(); - __jsb_cocos2d_GFXViewport_class = cls; + __jsb_cc_GFXViewport_proto = cls->getProto(); + __jsb_cc_GFXViewport_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXColor_proto = nullptr; -se::Class* __jsb_cocos2d_GFXColor_class = nullptr; +se::Object* __jsb_cc_GFXColor_proto = nullptr; +se::Class* __jsb_cc_GFXColor_class = nullptr; static bool js_gfx_GFXColor_get_r(se::State& s) { - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColor_get_r : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1798,7 +1798,7 @@ SE_BIND_PROP_GET(js_gfx_GFXColor_get_r) static bool js_gfx_GFXColor_set_r(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColor_set_r : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1812,7 +1812,7 @@ SE_BIND_PROP_SET(js_gfx_GFXColor_set_r) static bool js_gfx_GFXColor_get_g(se::State& s) { - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColor_get_g : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1826,7 +1826,7 @@ SE_BIND_PROP_GET(js_gfx_GFXColor_get_g) static bool js_gfx_GFXColor_set_g(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColor_set_g : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1840,7 +1840,7 @@ SE_BIND_PROP_SET(js_gfx_GFXColor_set_g) static bool js_gfx_GFXColor_get_b(se::State& s) { - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColor_get_b : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1854,7 +1854,7 @@ SE_BIND_PROP_GET(js_gfx_GFXColor_get_b) static bool js_gfx_GFXColor_set_b(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColor_set_b : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1868,7 +1868,7 @@ SE_BIND_PROP_SET(js_gfx_GFXColor_set_b) static bool js_gfx_GFXColor_get_a(se::State& s) { - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColor_get_a : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1882,7 +1882,7 @@ SE_BIND_PROP_GET(js_gfx_GFXColor_get_a) static bool js_gfx_GFXColor_set_a(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColor_set_a : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -1894,7 +1894,7 @@ static bool js_gfx_GFXColor_set_a(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXColor_set_a) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXColor_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXColor_finalize) static bool js_gfx_GFXColor_constructor(se::State& s) { @@ -1904,7 +1904,7 @@ static bool js_gfx_GFXColor_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXColor* cobj = JSB_ALLOC(cocos2d::GFXColor); + cc::GFXColor* cobj = JSB_ALLOC(cc::GFXColor); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -1914,7 +1914,7 @@ static bool js_gfx_GFXColor_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXColor* cobj = JSB_ALLOC(cocos2d::GFXColor); + cc::GFXColor* cobj = JSB_ALLOC(cc::GFXColor); float arg0 = 0; json->getProperty("r", &field); if(!field.isUndefined()) { @@ -1952,7 +1952,7 @@ static bool js_gfx_GFXColor_constructor(se::State& s) } else if(argc == 4) { - cocos2d::GFXColor* cobj = JSB_ALLOC(cocos2d::GFXColor); + cc::GFXColor* cobj = JSB_ALLOC(cc::GFXColor); float arg0 = 0; if (!args[0].isUndefined()) { ok &= seval_to_float(args[0], &arg0); @@ -1988,24 +1988,24 @@ static bool js_gfx_GFXColor_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXColor_constructor, __jsb_cocos2d_GFXColor_class, js_cocos2d_GFXColor_finalize) +SE_BIND_CTOR(js_gfx_GFXColor_constructor, __jsb_cc_GFXColor_class, js_cc_GFXColor_finalize) -static bool js_cocos2d_GFXColor_finalize(se::State& s) +static bool js_cc_GFXColor_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXColor)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXColor)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXColor* cobj = (cocos2d::GFXColor*)s.nativeThisObject(); + cc::GFXColor* cobj = (cc::GFXColor*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXColor_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXColor_finalize) bool js_register_gfx_GFXColor(se::Object* obj) { @@ -2015,23 +2015,23 @@ bool js_register_gfx_GFXColor(se::Object* obj) cls->defineProperty("g", _SE(js_gfx_GFXColor_get_g), _SE(js_gfx_GFXColor_set_g)); cls->defineProperty("b", _SE(js_gfx_GFXColor_get_b), _SE(js_gfx_GFXColor_set_b)); cls->defineProperty("a", _SE(js_gfx_GFXColor_get_a), _SE(js_gfx_GFXColor_set_a)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXColor_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXColor_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXColor_proto = cls->getProto(); - __jsb_cocos2d_GFXColor_class = cls; + __jsb_cc_GFXColor_proto = cls->getProto(); + __jsb_cc_GFXColor_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXDeviceInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXDeviceInfo_class = nullptr; +se::Object* __jsb_cc_GFXDeviceInfo_proto = nullptr; +se::Class* __jsb_cc_GFXDeviceInfo_class = nullptr; static bool js_gfx_GFXDeviceInfo_get_windowHandle(se::State& s) { - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_get_windowHandle : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2045,7 +2045,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDeviceInfo_get_windowHandle) static bool js_gfx_GFXDeviceInfo_set_windowHandle(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_set_windowHandle : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2059,7 +2059,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDeviceInfo_set_windowHandle) static bool js_gfx_GFXDeviceInfo_get_width(se::State& s) { - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_get_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2073,7 +2073,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDeviceInfo_get_width) static bool js_gfx_GFXDeviceInfo_set_width(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_set_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2087,7 +2087,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDeviceInfo_set_width) static bool js_gfx_GFXDeviceInfo_get_height(se::State& s) { - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_get_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2101,7 +2101,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDeviceInfo_get_height) static bool js_gfx_GFXDeviceInfo_set_height(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_set_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2115,7 +2115,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDeviceInfo_set_height) static bool js_gfx_GFXDeviceInfo_get_nativeWidth(se::State& s) { - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_get_nativeWidth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2129,7 +2129,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDeviceInfo_get_nativeWidth) static bool js_gfx_GFXDeviceInfo_set_nativeWidth(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_set_nativeWidth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2143,7 +2143,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDeviceInfo_set_nativeWidth) static bool js_gfx_GFXDeviceInfo_get_nativeHeight(se::State& s) { - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_get_nativeHeight : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2157,7 +2157,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDeviceInfo_get_nativeHeight) static bool js_gfx_GFXDeviceInfo_set_nativeHeight(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_set_nativeHeight : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2171,7 +2171,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDeviceInfo_set_nativeHeight) static bool js_gfx_GFXDeviceInfo_get_sharedCtx(se::State& s) { - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_get_sharedCtx : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2185,11 +2185,11 @@ SE_BIND_PROP_GET(js_gfx_GFXDeviceInfo_get_sharedCtx) static bool js_gfx_GFXDeviceInfo_set_sharedCtx(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDeviceInfo_set_sharedCtx : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXContext* arg0 = nullptr; + cc::GFXContext* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDeviceInfo_set_sharedCtx : Error processing new value"); cobj->sharedCtx = arg0; @@ -2197,7 +2197,7 @@ static bool js_gfx_GFXDeviceInfo_set_sharedCtx(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXDeviceInfo_set_sharedCtx) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXDeviceInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXDeviceInfo_finalize) static bool js_gfx_GFXDeviceInfo_constructor(se::State& s) { @@ -2207,7 +2207,7 @@ static bool js_gfx_GFXDeviceInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXDeviceInfo* cobj = JSB_ALLOC(cocos2d::GFXDeviceInfo); + cc::GFXDeviceInfo* cobj = JSB_ALLOC(cc::GFXDeviceInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -2217,7 +2217,7 @@ static bool js_gfx_GFXDeviceInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXDeviceInfo* cobj = JSB_ALLOC(cocos2d::GFXDeviceInfo); + cc::GFXDeviceInfo* cobj = JSB_ALLOC(cc::GFXDeviceInfo); uintptr_t arg0 = 0; json->getProperty("windowHandle", &field); if(!field.isUndefined()) { @@ -2248,7 +2248,7 @@ static bool js_gfx_GFXDeviceInfo_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg4); cobj->nativeHeight = arg4; } - cocos2d::GFXContext* arg5 = nullptr; + cc::GFXContext* arg5 = nullptr; json->getProperty("sharedCtx", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg5); @@ -2267,7 +2267,7 @@ static bool js_gfx_GFXDeviceInfo_constructor(se::State& s) } else if(argc == 6) { - cocos2d::GFXDeviceInfo* cobj = JSB_ALLOC(cocos2d::GFXDeviceInfo); + cc::GFXDeviceInfo* cobj = JSB_ALLOC(cc::GFXDeviceInfo); uintptr_t arg0 = 0; if (!args[0].isUndefined()) { ok &= seval_to_uintptr_t(args[0], &arg0); @@ -2293,7 +2293,7 @@ static bool js_gfx_GFXDeviceInfo_constructor(se::State& s) ok &= seval_to_uint32(args[4], (uint32_t*)&arg4); cobj->nativeHeight = arg4; } - cocos2d::GFXContext* arg5 = nullptr; + cc::GFXContext* arg5 = nullptr; if (!args[5].isUndefined()) { ok &= seval_to_native_ptr(args[5], &arg5); cobj->sharedCtx = arg5; @@ -2313,24 +2313,24 @@ static bool js_gfx_GFXDeviceInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXDeviceInfo_constructor, __jsb_cocos2d_GFXDeviceInfo_class, js_cocos2d_GFXDeviceInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXDeviceInfo_constructor, __jsb_cc_GFXDeviceInfo_class, js_cc_GFXDeviceInfo_finalize) -static bool js_cocos2d_GFXDeviceInfo_finalize(se::State& s) +static bool js_cc_GFXDeviceInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXDeviceInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXDeviceInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXDeviceInfo* cobj = (cocos2d::GFXDeviceInfo*)s.nativeThisObject(); + cc::GFXDeviceInfo* cobj = (cc::GFXDeviceInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXDeviceInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXDeviceInfo_finalize) bool js_register_gfx_GFXDeviceInfo(se::Object* obj) { @@ -2342,23 +2342,23 @@ bool js_register_gfx_GFXDeviceInfo(se::Object* obj) cls->defineProperty("nativeWidth", _SE(js_gfx_GFXDeviceInfo_get_nativeWidth), _SE(js_gfx_GFXDeviceInfo_set_nativeWidth)); cls->defineProperty("nativeHeight", _SE(js_gfx_GFXDeviceInfo_get_nativeHeight), _SE(js_gfx_GFXDeviceInfo_set_nativeHeight)); cls->defineProperty("sharedCtx", _SE(js_gfx_GFXDeviceInfo_get_sharedCtx), _SE(js_gfx_GFXDeviceInfo_set_sharedCtx)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXDeviceInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXDeviceInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXDeviceInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXDeviceInfo_class = cls; + __jsb_cc_GFXDeviceInfo_proto = cls->getProto(); + __jsb_cc_GFXDeviceInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXContextInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXContextInfo_class = nullptr; +se::Object* __jsb_cc_GFXContextInfo_proto = nullptr; +se::Class* __jsb_cc_GFXContextInfo_class = nullptr; static bool js_gfx_GFXContextInfo_get_windowHandle(se::State& s) { - cocos2d::GFXContextInfo* cobj = (cocos2d::GFXContextInfo*)s.nativeThisObject(); + cc::GFXContextInfo* cobj = (cc::GFXContextInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXContextInfo_get_windowHandle : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2372,7 +2372,7 @@ SE_BIND_PROP_GET(js_gfx_GFXContextInfo_get_windowHandle) static bool js_gfx_GFXContextInfo_set_windowHandle(se::State& s) { const auto& args = s.args(); - cocos2d::GFXContextInfo* cobj = (cocos2d::GFXContextInfo*)s.nativeThisObject(); + cc::GFXContextInfo* cobj = (cc::GFXContextInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXContextInfo_set_windowHandle : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2386,7 +2386,7 @@ SE_BIND_PROP_SET(js_gfx_GFXContextInfo_set_windowHandle) static bool js_gfx_GFXContextInfo_get_sharedCtx(se::State& s) { - cocos2d::GFXContextInfo* cobj = (cocos2d::GFXContextInfo*)s.nativeThisObject(); + cc::GFXContextInfo* cobj = (cc::GFXContextInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXContextInfo_get_sharedCtx : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2400,11 +2400,11 @@ SE_BIND_PROP_GET(js_gfx_GFXContextInfo_get_sharedCtx) static bool js_gfx_GFXContextInfo_set_sharedCtx(se::State& s) { const auto& args = s.args(); - cocos2d::GFXContextInfo* cobj = (cocos2d::GFXContextInfo*)s.nativeThisObject(); + cc::GFXContextInfo* cobj = (cc::GFXContextInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXContextInfo_set_sharedCtx : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXContext* arg0 = nullptr; + cc::GFXContext* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXContextInfo_set_sharedCtx : Error processing new value"); cobj->sharedCtx = arg0; @@ -2414,7 +2414,7 @@ SE_BIND_PROP_SET(js_gfx_GFXContextInfo_set_sharedCtx) static bool js_gfx_GFXContextInfo_get_vsyncMode(se::State& s) { - cocos2d::GFXContextInfo* cobj = (cocos2d::GFXContextInfo*)s.nativeThisObject(); + cc::GFXContextInfo* cobj = (cc::GFXContextInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXContextInfo_get_vsyncMode : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2428,19 +2428,19 @@ SE_BIND_PROP_GET(js_gfx_GFXContextInfo_get_vsyncMode) static bool js_gfx_GFXContextInfo_set_vsyncMode(se::State& s) { const auto& args = s.args(); - cocos2d::GFXContextInfo* cobj = (cocos2d::GFXContextInfo*)s.nativeThisObject(); + cc::GFXContextInfo* cobj = (cc::GFXContextInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXContextInfo_set_vsyncMode : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXVsyncMode arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXVsyncMode)tmp; } while(false); + cc::GFXVsyncMode arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXVsyncMode)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXContextInfo_set_vsyncMode : Error processing new value"); cobj->vsyncMode = arg0; return true; } SE_BIND_PROP_SET(js_gfx_GFXContextInfo_set_vsyncMode) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXContextInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXContextInfo_finalize) static bool js_gfx_GFXContextInfo_constructor(se::State& s) { @@ -2450,7 +2450,7 @@ static bool js_gfx_GFXContextInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXContextInfo* cobj = JSB_ALLOC(cocos2d::GFXContextInfo); + cc::GFXContextInfo* cobj = JSB_ALLOC(cc::GFXContextInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -2460,23 +2460,23 @@ static bool js_gfx_GFXContextInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXContextInfo* cobj = JSB_ALLOC(cocos2d::GFXContextInfo); + cc::GFXContextInfo* cobj = JSB_ALLOC(cc::GFXContextInfo); uintptr_t arg0 = 0; json->getProperty("windowHandle", &field); if(!field.isUndefined()) { ok &= seval_to_uintptr_t(field, &arg0); cobj->windowHandle = arg0; } - cocos2d::GFXContext* arg1 = nullptr; + cc::GFXContext* arg1 = nullptr; json->getProperty("sharedCtx", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg1); cobj->sharedCtx = arg1; } - cocos2d::GFXVsyncMode arg2; + cc::GFXVsyncMode arg2; json->getProperty("vsyncMode", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXVsyncMode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXVsyncMode)tmp; } while(false); cobj->vsyncMode = arg2; } @@ -2492,20 +2492,20 @@ static bool js_gfx_GFXContextInfo_constructor(se::State& s) } else if(argc == 3) { - cocos2d::GFXContextInfo* cobj = JSB_ALLOC(cocos2d::GFXContextInfo); + cc::GFXContextInfo* cobj = JSB_ALLOC(cc::GFXContextInfo); uintptr_t arg0 = 0; if (!args[0].isUndefined()) { ok &= seval_to_uintptr_t(args[0], &arg0); cobj->windowHandle = arg0; } - cocos2d::GFXContext* arg1 = nullptr; + cc::GFXContext* arg1 = nullptr; if (!args[1].isUndefined()) { ok &= seval_to_native_ptr(args[1], &arg1); cobj->sharedCtx = arg1; } - cocos2d::GFXVsyncMode arg2; + cc::GFXVsyncMode arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXVsyncMode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXVsyncMode)tmp; } while(false); cobj->vsyncMode = arg2; } @@ -2523,24 +2523,24 @@ static bool js_gfx_GFXContextInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXContextInfo_constructor, __jsb_cocos2d_GFXContextInfo_class, js_cocos2d_GFXContextInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXContextInfo_constructor, __jsb_cc_GFXContextInfo_class, js_cc_GFXContextInfo_finalize) -static bool js_cocos2d_GFXContextInfo_finalize(se::State& s) +static bool js_cc_GFXContextInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXContextInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXContextInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXContextInfo* cobj = (cocos2d::GFXContextInfo*)s.nativeThisObject(); + cc::GFXContextInfo* cobj = (cc::GFXContextInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXContextInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXContextInfo_finalize) bool js_register_gfx_GFXContextInfo(se::Object* obj) { @@ -2549,23 +2549,23 @@ bool js_register_gfx_GFXContextInfo(se::Object* obj) cls->defineProperty("windowHandle", _SE(js_gfx_GFXContextInfo_get_windowHandle), _SE(js_gfx_GFXContextInfo_set_windowHandle)); cls->defineProperty("sharedCtx", _SE(js_gfx_GFXContextInfo_get_sharedCtx), _SE(js_gfx_GFXContextInfo_set_sharedCtx)); cls->defineProperty("vsyncMode", _SE(js_gfx_GFXContextInfo_get_vsyncMode), _SE(js_gfx_GFXContextInfo_set_vsyncMode)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXContextInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXContextInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXContextInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXContextInfo_class = cls; + __jsb_cc_GFXContextInfo_proto = cls->getProto(); + __jsb_cc_GFXContextInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBufferInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBufferInfo_class = nullptr; +se::Object* __jsb_cc_GFXBufferInfo_proto = nullptr; +se::Class* __jsb_cc_GFXBufferInfo_class = nullptr; static bool js_gfx_GFXBufferInfo_get_usage(se::State& s) { - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_get_usage : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2579,12 +2579,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferInfo_get_usage) static bool js_gfx_GFXBufferInfo_set_usage(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_set_usage : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBufferUsageBit arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBufferUsageBit)tmp; } while(false); + cc::GFXBufferUsageBit arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBufferUsageBit)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBufferInfo_set_usage : Error processing new value"); cobj->usage = arg0; return true; @@ -2593,7 +2593,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBufferInfo_set_usage) static bool js_gfx_GFXBufferInfo_get_memUsage(se::State& s) { - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_get_memUsage : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2607,12 +2607,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferInfo_get_memUsage) static bool js_gfx_GFXBufferInfo_set_memUsage(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_set_memUsage : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXMemoryUsageBit arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXMemoryUsageBit)tmp; } while(false); + cc::GFXMemoryUsageBit arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXMemoryUsageBit)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBufferInfo_set_memUsage : Error processing new value"); cobj->memUsage = arg0; return true; @@ -2621,7 +2621,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBufferInfo_set_memUsage) static bool js_gfx_GFXBufferInfo_get_stride(se::State& s) { - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_get_stride : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2635,7 +2635,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferInfo_get_stride) static bool js_gfx_GFXBufferInfo_set_stride(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_set_stride : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2649,7 +2649,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBufferInfo_set_stride) static bool js_gfx_GFXBufferInfo_get_size(se::State& s) { - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_get_size : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2663,7 +2663,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferInfo_get_size) static bool js_gfx_GFXBufferInfo_set_size(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_set_size : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2677,7 +2677,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBufferInfo_set_size) static bool js_gfx_GFXBufferInfo_get_flags(se::State& s) { - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_get_flags : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2691,19 +2691,19 @@ SE_BIND_PROP_GET(js_gfx_GFXBufferInfo_get_flags) static bool js_gfx_GFXBufferInfo_set_flags(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBufferInfo_set_flags : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBufferFlagBit arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBufferFlagBit)tmp; } while(false); + cc::GFXBufferFlagBit arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBufferFlagBit)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBufferInfo_set_flags : Error processing new value"); cobj->flags = arg0; return true; } SE_BIND_PROP_SET(js_gfx_GFXBufferInfo_set_flags) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBufferInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBufferInfo_finalize) static bool js_gfx_GFXBufferInfo_constructor(se::State& s) { @@ -2713,7 +2713,7 @@ static bool js_gfx_GFXBufferInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXBufferInfo* cobj = JSB_ALLOC(cocos2d::GFXBufferInfo); + cc::GFXBufferInfo* cobj = JSB_ALLOC(cc::GFXBufferInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -2723,17 +2723,17 @@ static bool js_gfx_GFXBufferInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXBufferInfo* cobj = JSB_ALLOC(cocos2d::GFXBufferInfo); - cocos2d::GFXBufferUsageBit arg0; + cc::GFXBufferInfo* cobj = JSB_ALLOC(cc::GFXBufferInfo); + cc::GFXBufferUsageBit arg0; json->getProperty("usage", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXBufferUsageBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXBufferUsageBit)tmp; } while(false); cobj->usage = arg0; } - cocos2d::GFXMemoryUsageBit arg1; + cc::GFXMemoryUsageBit arg1; json->getProperty("memUsage", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXMemoryUsageBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXMemoryUsageBit)tmp; } while(false); cobj->memUsage = arg1; } unsigned int arg2 = 0; @@ -2748,10 +2748,10 @@ static bool js_gfx_GFXBufferInfo_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg3); cobj->size = arg3; } - cocos2d::GFXBufferFlagBit arg4; + cc::GFXBufferFlagBit arg4; json->getProperty("flags", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cocos2d::GFXBufferFlagBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cc::GFXBufferFlagBit)tmp; } while(false); cobj->flags = arg4; } @@ -2767,15 +2767,15 @@ static bool js_gfx_GFXBufferInfo_constructor(se::State& s) } else if(argc == 5) { - cocos2d::GFXBufferInfo* cobj = JSB_ALLOC(cocos2d::GFXBufferInfo); - cocos2d::GFXBufferUsageBit arg0; + cc::GFXBufferInfo* cobj = JSB_ALLOC(cc::GFXBufferInfo); + cc::GFXBufferUsageBit arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBufferUsageBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBufferUsageBit)tmp; } while(false); cobj->usage = arg0; } - cocos2d::GFXMemoryUsageBit arg1; + cc::GFXMemoryUsageBit arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXMemoryUsageBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXMemoryUsageBit)tmp; } while(false); cobj->memUsage = arg1; } unsigned int arg2 = 0; @@ -2788,9 +2788,9 @@ static bool js_gfx_GFXBufferInfo_constructor(se::State& s) ok &= seval_to_uint32(args[3], (uint32_t*)&arg3); cobj->size = arg3; } - cocos2d::GFXBufferFlagBit arg4; + cc::GFXBufferFlagBit arg4; if (!args[4].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cocos2d::GFXBufferFlagBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cc::GFXBufferFlagBit)tmp; } while(false); cobj->flags = arg4; } @@ -2808,24 +2808,24 @@ static bool js_gfx_GFXBufferInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXBufferInfo_constructor, __jsb_cocos2d_GFXBufferInfo_class, js_cocos2d_GFXBufferInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXBufferInfo_constructor, __jsb_cc_GFXBufferInfo_class, js_cc_GFXBufferInfo_finalize) -static bool js_cocos2d_GFXBufferInfo_finalize(se::State& s) +static bool js_cc_GFXBufferInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBufferInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBufferInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBufferInfo* cobj = (cocos2d::GFXBufferInfo*)s.nativeThisObject(); + cc::GFXBufferInfo* cobj = (cc::GFXBufferInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBufferInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBufferInfo_finalize) bool js_register_gfx_GFXBufferInfo(se::Object* obj) { @@ -2836,23 +2836,23 @@ bool js_register_gfx_GFXBufferInfo(se::Object* obj) cls->defineProperty("stride", _SE(js_gfx_GFXBufferInfo_get_stride), _SE(js_gfx_GFXBufferInfo_set_stride)); cls->defineProperty("size", _SE(js_gfx_GFXBufferInfo_get_size), _SE(js_gfx_GFXBufferInfo_set_size)); cls->defineProperty("flags", _SE(js_gfx_GFXBufferInfo_get_flags), _SE(js_gfx_GFXBufferInfo_set_flags)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBufferInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBufferInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBufferInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXBufferInfo_class = cls; + __jsb_cc_GFXBufferInfo_proto = cls->getProto(); + __jsb_cc_GFXBufferInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXDrawInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXDrawInfo_class = nullptr; +se::Object* __jsb_cc_GFXDrawInfo_proto = nullptr; +se::Class* __jsb_cc_GFXDrawInfo_class = nullptr; static bool js_gfx_GFXDrawInfo_get_vertexCount(se::State& s) { - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_get_vertexCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2866,7 +2866,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDrawInfo_get_vertexCount) static bool js_gfx_GFXDrawInfo_set_vertexCount(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_set_vertexCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2880,7 +2880,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDrawInfo_set_vertexCount) static bool js_gfx_GFXDrawInfo_get_firstVertex(se::State& s) { - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_get_firstVertex : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2894,7 +2894,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDrawInfo_get_firstVertex) static bool js_gfx_GFXDrawInfo_set_firstVertex(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_set_firstVertex : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2908,7 +2908,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDrawInfo_set_firstVertex) static bool js_gfx_GFXDrawInfo_get_indexCount(se::State& s) { - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_get_indexCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2922,7 +2922,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDrawInfo_get_indexCount) static bool js_gfx_GFXDrawInfo_set_indexCount(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_set_indexCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2936,7 +2936,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDrawInfo_set_indexCount) static bool js_gfx_GFXDrawInfo_get_firstIndex(se::State& s) { - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_get_firstIndex : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2950,7 +2950,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDrawInfo_get_firstIndex) static bool js_gfx_GFXDrawInfo_set_firstIndex(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_set_firstIndex : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2964,7 +2964,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDrawInfo_set_firstIndex) static bool js_gfx_GFXDrawInfo_get_vertexOffset(se::State& s) { - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_get_vertexOffset : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2978,7 +2978,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDrawInfo_get_vertexOffset) static bool js_gfx_GFXDrawInfo_set_vertexOffset(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_set_vertexOffset : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -2992,7 +2992,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDrawInfo_set_vertexOffset) static bool js_gfx_GFXDrawInfo_get_instanceCount(se::State& s) { - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_get_instanceCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3006,7 +3006,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDrawInfo_get_instanceCount) static bool js_gfx_GFXDrawInfo_set_instanceCount(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_set_instanceCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3020,7 +3020,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDrawInfo_set_instanceCount) static bool js_gfx_GFXDrawInfo_get_firstInstance(se::State& s) { - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_get_firstInstance : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3034,7 +3034,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDrawInfo_get_firstInstance) static bool js_gfx_GFXDrawInfo_set_firstInstance(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDrawInfo_set_firstInstance : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3046,7 +3046,7 @@ static bool js_gfx_GFXDrawInfo_set_firstInstance(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXDrawInfo_set_firstInstance) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXDrawInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXDrawInfo_finalize) static bool js_gfx_GFXDrawInfo_constructor(se::State& s) { @@ -3056,7 +3056,7 @@ static bool js_gfx_GFXDrawInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXDrawInfo* cobj = JSB_ALLOC(cocos2d::GFXDrawInfo); + cc::GFXDrawInfo* cobj = JSB_ALLOC(cc::GFXDrawInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -3066,7 +3066,7 @@ static bool js_gfx_GFXDrawInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXDrawInfo* cobj = JSB_ALLOC(cocos2d::GFXDrawInfo); + cc::GFXDrawInfo* cobj = JSB_ALLOC(cc::GFXDrawInfo); unsigned int arg0 = 0; json->getProperty("vertexCount", &field); if(!field.isUndefined()) { @@ -3122,7 +3122,7 @@ static bool js_gfx_GFXDrawInfo_constructor(se::State& s) } else if(argc == 7) { - cocos2d::GFXDrawInfo* cobj = JSB_ALLOC(cocos2d::GFXDrawInfo); + cc::GFXDrawInfo* cobj = JSB_ALLOC(cc::GFXDrawInfo); unsigned int arg0 = 0; if (!args[0].isUndefined()) { ok &= seval_to_uint32(args[0], (uint32_t*)&arg0); @@ -3173,24 +3173,24 @@ static bool js_gfx_GFXDrawInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXDrawInfo_constructor, __jsb_cocos2d_GFXDrawInfo_class, js_cocos2d_GFXDrawInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXDrawInfo_constructor, __jsb_cc_GFXDrawInfo_class, js_cc_GFXDrawInfo_finalize) -static bool js_cocos2d_GFXDrawInfo_finalize(se::State& s) +static bool js_cc_GFXDrawInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXDrawInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXDrawInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXDrawInfo* cobj = (cocos2d::GFXDrawInfo*)s.nativeThisObject(); + cc::GFXDrawInfo* cobj = (cc::GFXDrawInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXDrawInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXDrawInfo_finalize) bool js_register_gfx_GFXDrawInfo(se::Object* obj) { @@ -3203,23 +3203,23 @@ bool js_register_gfx_GFXDrawInfo(se::Object* obj) cls->defineProperty("vertexOffset", _SE(js_gfx_GFXDrawInfo_get_vertexOffset), _SE(js_gfx_GFXDrawInfo_set_vertexOffset)); cls->defineProperty("instanceCount", _SE(js_gfx_GFXDrawInfo_get_instanceCount), _SE(js_gfx_GFXDrawInfo_set_instanceCount)); cls->defineProperty("firstInstance", _SE(js_gfx_GFXDrawInfo_get_firstInstance), _SE(js_gfx_GFXDrawInfo_set_firstInstance)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXDrawInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXDrawInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXDrawInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXDrawInfo_class = cls; + __jsb_cc_GFXDrawInfo_proto = cls->getProto(); + __jsb_cc_GFXDrawInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXIndirectBuffer_proto = nullptr; -se::Class* __jsb_cocos2d_GFXIndirectBuffer_class = nullptr; +se::Object* __jsb_cc_GFXIndirectBuffer_proto = nullptr; +se::Class* __jsb_cc_GFXIndirectBuffer_class = nullptr; static bool js_gfx_GFXIndirectBuffer_get_drawInfos(se::State& s) { - cocos2d::GFXIndirectBuffer* cobj = (cocos2d::GFXIndirectBuffer*)s.nativeThisObject(); + cc::GFXIndirectBuffer* cobj = (cc::GFXIndirectBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXIndirectBuffer_get_drawInfos : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3233,11 +3233,11 @@ SE_BIND_PROP_GET(js_gfx_GFXIndirectBuffer_get_drawInfos) static bool js_gfx_GFXIndirectBuffer_set_drawInfos(se::State& s) { const auto& args = s.args(); - cocos2d::GFXIndirectBuffer* cobj = (cocos2d::GFXIndirectBuffer*)s.nativeThisObject(); + cc::GFXIndirectBuffer* cobj = (cc::GFXIndirectBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXIndirectBuffer_set_drawInfos : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXIndirectBuffer_set_drawInfos : Error processing new value"); cobj->drawInfos = arg0; @@ -3245,7 +3245,7 @@ static bool js_gfx_GFXIndirectBuffer_set_drawInfos(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXIndirectBuffer_set_drawInfos) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXIndirectBuffer_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXIndirectBuffer_finalize) static bool js_gfx_GFXIndirectBuffer_constructor(se::State& s) { @@ -3255,15 +3255,15 @@ static bool js_gfx_GFXIndirectBuffer_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXIndirectBuffer* cobj = JSB_ALLOC(cocos2d::GFXIndirectBuffer); + cc::GFXIndirectBuffer* cobj = JSB_ALLOC(cc::GFXIndirectBuffer); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } else if(argc == 1) { - cocos2d::GFXIndirectBuffer* cobj = JSB_ALLOC(cocos2d::GFXIndirectBuffer); - std::vector arg0; + cc::GFXIndirectBuffer* cobj = JSB_ALLOC(cc::GFXIndirectBuffer); + std::vector arg0; if (!args[0].isUndefined()) { ok &= seval_to_std_vector(args[0], &arg0); cobj->drawInfos = arg0; @@ -3283,47 +3283,47 @@ static bool js_gfx_GFXIndirectBuffer_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXIndirectBuffer_constructor, __jsb_cocos2d_GFXIndirectBuffer_class, js_cocos2d_GFXIndirectBuffer_finalize) +SE_BIND_CTOR(js_gfx_GFXIndirectBuffer_constructor, __jsb_cc_GFXIndirectBuffer_class, js_cc_GFXIndirectBuffer_finalize) -static bool js_cocos2d_GFXIndirectBuffer_finalize(se::State& s) +static bool js_cc_GFXIndirectBuffer_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXIndirectBuffer)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXIndirectBuffer)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXIndirectBuffer* cobj = (cocos2d::GFXIndirectBuffer*)s.nativeThisObject(); + cc::GFXIndirectBuffer* cobj = (cc::GFXIndirectBuffer*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXIndirectBuffer_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXIndirectBuffer_finalize) bool js_register_gfx_GFXIndirectBuffer(se::Object* obj) { auto cls = se::Class::create("GFXIndirectBuffer", obj, nullptr, _SE(js_gfx_GFXIndirectBuffer_constructor)); cls->defineProperty("drawInfos", _SE(js_gfx_GFXIndirectBuffer_get_drawInfos), _SE(js_gfx_GFXIndirectBuffer_set_drawInfos)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXIndirectBuffer_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXIndirectBuffer_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXIndirectBuffer_proto = cls->getProto(); - __jsb_cocos2d_GFXIndirectBuffer_class = cls; + __jsb_cc_GFXIndirectBuffer_proto = cls->getProto(); + __jsb_cc_GFXIndirectBuffer_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXTextureInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXTextureInfo_class = nullptr; +se::Object* __jsb_cc_GFXTextureInfo_proto = nullptr; +se::Class* __jsb_cc_GFXTextureInfo_class = nullptr; static bool js_gfx_GFXTextureInfo_get_type(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3337,12 +3337,12 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_type) static bool js_gfx_GFXTextureInfo_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureType)tmp; } while(false); + cc::GFXTextureType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureInfo_set_type : Error processing new value"); cobj->type = arg0; return true; @@ -3351,7 +3351,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_type) static bool js_gfx_GFXTextureInfo_get_usage(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_usage : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3365,12 +3365,12 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_usage) static bool js_gfx_GFXTextureInfo_set_usage(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_usage : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureUsageBit arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureUsageBit)tmp; } while(false); + cc::GFXTextureUsageBit arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureUsageBit)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureInfo_set_usage : Error processing new value"); cobj->usage = arg0; return true; @@ -3379,7 +3379,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_usage) static bool js_gfx_GFXTextureInfo_get_format(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_format : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3393,12 +3393,12 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_format) static bool js_gfx_GFXTextureInfo_set_format(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_format : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFormat arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + cc::GFXFormat arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureInfo_set_format : Error processing new value"); cobj->format = arg0; return true; @@ -3407,7 +3407,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_format) static bool js_gfx_GFXTextureInfo_get_width(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3421,7 +3421,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_width) static bool js_gfx_GFXTextureInfo_set_width(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_width : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3435,7 +3435,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_width) static bool js_gfx_GFXTextureInfo_get_height(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3449,7 +3449,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_height) static bool js_gfx_GFXTextureInfo_set_height(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_height : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3463,7 +3463,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_height) static bool js_gfx_GFXTextureInfo_get_depth(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_depth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3477,7 +3477,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_depth) static bool js_gfx_GFXTextureInfo_set_depth(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_depth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3491,7 +3491,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_depth) static bool js_gfx_GFXTextureInfo_get_arrayLayer(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_arrayLayer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3505,7 +3505,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_arrayLayer) static bool js_gfx_GFXTextureInfo_set_arrayLayer(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_arrayLayer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3519,7 +3519,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_arrayLayer) static bool js_gfx_GFXTextureInfo_get_mipLevel(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_mipLevel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3533,7 +3533,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_mipLevel) static bool js_gfx_GFXTextureInfo_set_mipLevel(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_mipLevel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3547,7 +3547,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_mipLevel) static bool js_gfx_GFXTextureInfo_get_samples(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_samples : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3561,12 +3561,12 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_samples) static bool js_gfx_GFXTextureInfo_set_samples(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_samples : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXSampleCount arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXSampleCount)tmp; } while(false); + cc::GFXSampleCount arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXSampleCount)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureInfo_set_samples : Error processing new value"); cobj->samples = arg0; return true; @@ -3575,7 +3575,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_samples) static bool js_gfx_GFXTextureInfo_get_flags(se::State& s) { - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_get_flags : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3589,19 +3589,19 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureInfo_get_flags) static bool js_gfx_GFXTextureInfo_set_flags(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureInfo_set_flags : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureFlagBit arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureFlagBit)tmp; } while(false); + cc::GFXTextureFlagBit arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureFlagBit)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureInfo_set_flags : Error processing new value"); cobj->flags = arg0; return true; } SE_BIND_PROP_SET(js_gfx_GFXTextureInfo_set_flags) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXTextureInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXTextureInfo_finalize) static bool js_gfx_GFXTextureInfo_constructor(se::State& s) { @@ -3611,7 +3611,7 @@ static bool js_gfx_GFXTextureInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXTextureInfo* cobj = JSB_ALLOC(cocos2d::GFXTextureInfo); + cc::GFXTextureInfo* cobj = JSB_ALLOC(cc::GFXTextureInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -3621,23 +3621,23 @@ static bool js_gfx_GFXTextureInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXTextureInfo* cobj = JSB_ALLOC(cocos2d::GFXTextureInfo); - cocos2d::GFXTextureType arg0; + cc::GFXTextureInfo* cobj = JSB_ALLOC(cc::GFXTextureInfo); + cc::GFXTextureType arg0; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXTextureType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXTextureType)tmp; } while(false); cobj->type = arg0; } - cocos2d::GFXTextureUsageBit arg1; + cc::GFXTextureUsageBit arg1; json->getProperty("usage", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXTextureUsageBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXTextureUsageBit)tmp; } while(false); cobj->usage = arg1; } - cocos2d::GFXFormat arg2; + cc::GFXFormat arg2; json->getProperty("format", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg2; } unsigned int arg3 = 0; @@ -3670,16 +3670,16 @@ static bool js_gfx_GFXTextureInfo_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg7); cobj->mipLevel = arg7; } - cocos2d::GFXSampleCount arg8; + cc::GFXSampleCount arg8; json->getProperty("samples", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg8 = (cocos2d::GFXSampleCount)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg8 = (cc::GFXSampleCount)tmp; } while(false); cobj->samples = arg8; } - cocos2d::GFXTextureFlagBit arg9; + cc::GFXTextureFlagBit arg9; json->getProperty("flags", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg9 = (cocos2d::GFXTextureFlagBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg9 = (cc::GFXTextureFlagBit)tmp; } while(false); cobj->flags = arg9; } @@ -3695,20 +3695,20 @@ static bool js_gfx_GFXTextureInfo_constructor(se::State& s) } else if(argc == 10) { - cocos2d::GFXTextureInfo* cobj = JSB_ALLOC(cocos2d::GFXTextureInfo); - cocos2d::GFXTextureType arg0; + cc::GFXTextureInfo* cobj = JSB_ALLOC(cc::GFXTextureInfo); + cc::GFXTextureType arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureType)tmp; } while(false); cobj->type = arg0; } - cocos2d::GFXTextureUsageBit arg1; + cc::GFXTextureUsageBit arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXTextureUsageBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXTextureUsageBit)tmp; } while(false); cobj->usage = arg1; } - cocos2d::GFXFormat arg2; + cc::GFXFormat arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg2; } unsigned int arg3 = 0; @@ -3736,14 +3736,14 @@ static bool js_gfx_GFXTextureInfo_constructor(se::State& s) ok &= seval_to_uint32(args[7], (uint32_t*)&arg7); cobj->mipLevel = arg7; } - cocos2d::GFXSampleCount arg8; + cc::GFXSampleCount arg8; if (!args[8].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[8], &tmp); arg8 = (cocos2d::GFXSampleCount)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[8], &tmp); arg8 = (cc::GFXSampleCount)tmp; } while(false); cobj->samples = arg8; } - cocos2d::GFXTextureFlagBit arg9; + cc::GFXTextureFlagBit arg9; if (!args[9].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[9], &tmp); arg9 = (cocos2d::GFXTextureFlagBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[9], &tmp); arg9 = (cc::GFXTextureFlagBit)tmp; } while(false); cobj->flags = arg9; } @@ -3761,24 +3761,24 @@ static bool js_gfx_GFXTextureInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXTextureInfo_constructor, __jsb_cocos2d_GFXTextureInfo_class, js_cocos2d_GFXTextureInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXTextureInfo_constructor, __jsb_cc_GFXTextureInfo_class, js_cc_GFXTextureInfo_finalize) -static bool js_cocos2d_GFXTextureInfo_finalize(se::State& s) +static bool js_cc_GFXTextureInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXTextureInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXTextureInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXTextureInfo* cobj = (cocos2d::GFXTextureInfo*)s.nativeThisObject(); + cc::GFXTextureInfo* cobj = (cc::GFXTextureInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXTextureInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXTextureInfo_finalize) bool js_register_gfx_GFXTextureInfo(se::Object* obj) { @@ -3794,23 +3794,23 @@ bool js_register_gfx_GFXTextureInfo(se::Object* obj) cls->defineProperty("mipLevel", _SE(js_gfx_GFXTextureInfo_get_mipLevel), _SE(js_gfx_GFXTextureInfo_set_mipLevel)); cls->defineProperty("samples", _SE(js_gfx_GFXTextureInfo_get_samples), _SE(js_gfx_GFXTextureInfo_set_samples)); cls->defineProperty("flags", _SE(js_gfx_GFXTextureInfo_get_flags), _SE(js_gfx_GFXTextureInfo_set_flags)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXTextureInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXTextureInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXTextureInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXTextureInfo_class = cls; + __jsb_cc_GFXTextureInfo_proto = cls->getProto(); + __jsb_cc_GFXTextureInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXTextureViewInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXTextureViewInfo_class = nullptr; +se::Object* __jsb_cc_GFXTextureViewInfo_proto = nullptr; +se::Class* __jsb_cc_GFXTextureViewInfo_class = nullptr; static bool js_gfx_GFXTextureViewInfo_get_texture(se::State& s) { - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_get_texture : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3824,11 +3824,11 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureViewInfo_get_texture) static bool js_gfx_GFXTextureViewInfo_set_texture(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_set_texture : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTexture* arg0 = nullptr; + cc::GFXTexture* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureViewInfo_set_texture : Error processing new value"); cobj->texture = arg0; @@ -3838,7 +3838,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureViewInfo_set_texture) static bool js_gfx_GFXTextureViewInfo_get_type(se::State& s) { - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3852,12 +3852,12 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureViewInfo_get_type) static bool js_gfx_GFXTextureViewInfo_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureType)tmp; } while(false); + cc::GFXTextureType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureViewInfo_set_type : Error processing new value"); cobj->type = arg0; return true; @@ -3866,7 +3866,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureViewInfo_set_type) static bool js_gfx_GFXTextureViewInfo_get_format(se::State& s) { - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_get_format : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3880,12 +3880,12 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureViewInfo_get_format) static bool js_gfx_GFXTextureViewInfo_set_format(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_set_format : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFormat arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + cc::GFXFormat arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXTextureViewInfo_set_format : Error processing new value"); cobj->format = arg0; return true; @@ -3894,7 +3894,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureViewInfo_set_format) static bool js_gfx_GFXTextureViewInfo_get_baseLevel(se::State& s) { - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_get_baseLevel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3908,7 +3908,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureViewInfo_get_baseLevel) static bool js_gfx_GFXTextureViewInfo_set_baseLevel(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_set_baseLevel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3922,7 +3922,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureViewInfo_set_baseLevel) static bool js_gfx_GFXTextureViewInfo_get_levelCount(se::State& s) { - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_get_levelCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3936,7 +3936,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureViewInfo_get_levelCount) static bool js_gfx_GFXTextureViewInfo_set_levelCount(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_set_levelCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3950,7 +3950,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureViewInfo_set_levelCount) static bool js_gfx_GFXTextureViewInfo_get_baseLayer(se::State& s) { - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_get_baseLayer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3964,7 +3964,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureViewInfo_get_baseLayer) static bool js_gfx_GFXTextureViewInfo_set_baseLayer(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_set_baseLayer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3978,7 +3978,7 @@ SE_BIND_PROP_SET(js_gfx_GFXTextureViewInfo_set_baseLayer) static bool js_gfx_GFXTextureViewInfo_get_layerCount(se::State& s) { - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_get_layerCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -3992,7 +3992,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTextureViewInfo_get_layerCount) static bool js_gfx_GFXTextureViewInfo_set_layerCount(se::State& s) { const auto& args = s.args(); - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTextureViewInfo_set_layerCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4004,7 +4004,7 @@ static bool js_gfx_GFXTextureViewInfo_set_layerCount(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXTextureViewInfo_set_layerCount) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXTextureViewInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXTextureViewInfo_finalize) static bool js_gfx_GFXTextureViewInfo_constructor(se::State& s) { @@ -4014,7 +4014,7 @@ static bool js_gfx_GFXTextureViewInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXTextureViewInfo* cobj = JSB_ALLOC(cocos2d::GFXTextureViewInfo); + cc::GFXTextureViewInfo* cobj = JSB_ALLOC(cc::GFXTextureViewInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -4024,23 +4024,23 @@ static bool js_gfx_GFXTextureViewInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXTextureViewInfo* cobj = JSB_ALLOC(cocos2d::GFXTextureViewInfo); - cocos2d::GFXTexture* arg0 = nullptr; + cc::GFXTextureViewInfo* cobj = JSB_ALLOC(cc::GFXTextureViewInfo); + cc::GFXTexture* arg0 = nullptr; json->getProperty("texture", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg0); cobj->texture = arg0; } - cocos2d::GFXTextureType arg1; + cc::GFXTextureType arg1; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXTextureType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXTextureType)tmp; } while(false); cobj->type = arg1; } - cocos2d::GFXFormat arg2; + cc::GFXFormat arg2; json->getProperty("format", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg2; } unsigned int arg3 = 0; @@ -4080,20 +4080,20 @@ static bool js_gfx_GFXTextureViewInfo_constructor(se::State& s) } else if(argc == 7) { - cocos2d::GFXTextureViewInfo* cobj = JSB_ALLOC(cocos2d::GFXTextureViewInfo); - cocos2d::GFXTexture* arg0 = nullptr; + cc::GFXTextureViewInfo* cobj = JSB_ALLOC(cc::GFXTextureViewInfo); + cc::GFXTexture* arg0 = nullptr; if (!args[0].isUndefined()) { ok &= seval_to_native_ptr(args[0], &arg0); cobj->texture = arg0; } - cocos2d::GFXTextureType arg1; + cc::GFXTextureType arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXTextureType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXTextureType)tmp; } while(false); cobj->type = arg1; } - cocos2d::GFXFormat arg2; + cc::GFXFormat arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg2; } unsigned int arg3 = 0; @@ -4131,24 +4131,24 @@ static bool js_gfx_GFXTextureViewInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXTextureViewInfo_constructor, __jsb_cocos2d_GFXTextureViewInfo_class, js_cocos2d_GFXTextureViewInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXTextureViewInfo_constructor, __jsb_cc_GFXTextureViewInfo_class, js_cc_GFXTextureViewInfo_finalize) -static bool js_cocos2d_GFXTextureViewInfo_finalize(se::State& s) +static bool js_cc_GFXTextureViewInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXTextureViewInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXTextureViewInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXTextureViewInfo* cobj = (cocos2d::GFXTextureViewInfo*)s.nativeThisObject(); + cc::GFXTextureViewInfo* cobj = (cc::GFXTextureViewInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXTextureViewInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXTextureViewInfo_finalize) bool js_register_gfx_GFXTextureViewInfo(se::Object* obj) { @@ -4161,23 +4161,23 @@ bool js_register_gfx_GFXTextureViewInfo(se::Object* obj) cls->defineProperty("levelCount", _SE(js_gfx_GFXTextureViewInfo_get_levelCount), _SE(js_gfx_GFXTextureViewInfo_set_levelCount)); cls->defineProperty("baseLayer", _SE(js_gfx_GFXTextureViewInfo_get_baseLayer), _SE(js_gfx_GFXTextureViewInfo_set_baseLayer)); cls->defineProperty("layerCount", _SE(js_gfx_GFXTextureViewInfo_get_layerCount), _SE(js_gfx_GFXTextureViewInfo_set_layerCount)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXTextureViewInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXTextureViewInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXTextureViewInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXTextureViewInfo_class = cls; + __jsb_cc_GFXTextureViewInfo_proto = cls->getProto(); + __jsb_cc_GFXTextureViewInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXSamplerInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXSamplerInfo_class = nullptr; +se::Object* __jsb_cc_GFXSamplerInfo_proto = nullptr; +se::Class* __jsb_cc_GFXSamplerInfo_class = nullptr; static bool js_gfx_GFXSamplerInfo_get_name(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4191,11 +4191,11 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_name) static bool js_gfx_GFXSamplerInfo_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_name : Error processing new value"); cobj->name = arg0; @@ -4205,7 +4205,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_name) static bool js_gfx_GFXSamplerInfo_get_minFilter(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_minFilter : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4219,12 +4219,12 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_minFilter) static bool js_gfx_GFXSamplerInfo_set_minFilter(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_minFilter : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFilter arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFilter)tmp; } while(false); + cc::GFXFilter arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFilter)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_minFilter : Error processing new value"); cobj->minFilter = arg0; return true; @@ -4233,7 +4233,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_minFilter) static bool js_gfx_GFXSamplerInfo_get_magFilter(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_magFilter : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4247,12 +4247,12 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_magFilter) static bool js_gfx_GFXSamplerInfo_set_magFilter(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_magFilter : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFilter arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFilter)tmp; } while(false); + cc::GFXFilter arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFilter)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_magFilter : Error processing new value"); cobj->magFilter = arg0; return true; @@ -4261,7 +4261,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_magFilter) static bool js_gfx_GFXSamplerInfo_get_mipFilter(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_mipFilter : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4275,12 +4275,12 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_mipFilter) static bool js_gfx_GFXSamplerInfo_set_mipFilter(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_mipFilter : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFilter arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFilter)tmp; } while(false); + cc::GFXFilter arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFilter)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_mipFilter : Error processing new value"); cobj->mipFilter = arg0; return true; @@ -4289,7 +4289,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_mipFilter) static bool js_gfx_GFXSamplerInfo_get_addressU(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_addressU : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4303,12 +4303,12 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_addressU) static bool js_gfx_GFXSamplerInfo_set_addressU(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_addressU : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXAddress arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXAddress)tmp; } while(false); + cc::GFXAddress arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXAddress)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_addressU : Error processing new value"); cobj->addressU = arg0; return true; @@ -4317,7 +4317,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_addressU) static bool js_gfx_GFXSamplerInfo_get_addressV(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_addressV : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4331,12 +4331,12 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_addressV) static bool js_gfx_GFXSamplerInfo_set_addressV(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_addressV : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXAddress arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXAddress)tmp; } while(false); + cc::GFXAddress arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXAddress)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_addressV : Error processing new value"); cobj->addressV = arg0; return true; @@ -4345,7 +4345,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_addressV) static bool js_gfx_GFXSamplerInfo_get_addressW(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_addressW : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4359,12 +4359,12 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_addressW) static bool js_gfx_GFXSamplerInfo_set_addressW(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_addressW : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXAddress arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXAddress)tmp; } while(false); + cc::GFXAddress arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXAddress)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_addressW : Error processing new value"); cobj->addressW = arg0; return true; @@ -4373,7 +4373,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_addressW) static bool js_gfx_GFXSamplerInfo_get_maxAnisotropy(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_maxAnisotropy : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4387,7 +4387,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_maxAnisotropy) static bool js_gfx_GFXSamplerInfo_set_maxAnisotropy(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_maxAnisotropy : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4401,7 +4401,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_maxAnisotropy) static bool js_gfx_GFXSamplerInfo_get_cmpFunc(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_cmpFunc : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4415,12 +4415,12 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_cmpFunc) static bool js_gfx_GFXSamplerInfo_set_cmpFunc(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_cmpFunc : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXComparisonFunc arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + cc::GFXComparisonFunc arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXComparisonFunc)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_cmpFunc : Error processing new value"); cobj->cmpFunc = arg0; return true; @@ -4429,7 +4429,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_cmpFunc) static bool js_gfx_GFXSamplerInfo_get_borderColor(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_borderColor : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4443,11 +4443,11 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_borderColor) static bool js_gfx_GFXSamplerInfo_set_borderColor(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_borderColor : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXColor* arg0 = nullptr; + cc::GFXColor* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXSamplerInfo_set_borderColor : Error processing new value"); cobj->borderColor = *arg0; @@ -4457,7 +4457,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_borderColor) static bool js_gfx_GFXSamplerInfo_get_minLOD(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_minLOD : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4471,7 +4471,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_minLOD) static bool js_gfx_GFXSamplerInfo_set_minLOD(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_minLOD : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4485,7 +4485,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_minLOD) static bool js_gfx_GFXSamplerInfo_get_maxLOD(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_maxLOD : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4499,7 +4499,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_maxLOD) static bool js_gfx_GFXSamplerInfo_set_maxLOD(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_maxLOD : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4513,7 +4513,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_maxLOD) static bool js_gfx_GFXSamplerInfo_get_mipLODBias(se::State& s) { - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_get_mipLODBias : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4527,7 +4527,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSamplerInfo_get_mipLODBias) static bool js_gfx_GFXSamplerInfo_set_mipLODBias(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSamplerInfo_set_mipLODBias : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4539,7 +4539,7 @@ static bool js_gfx_GFXSamplerInfo_set_mipLODBias(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXSamplerInfo_set_mipLODBias) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXSamplerInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXSamplerInfo_finalize) static bool js_gfx_GFXSamplerInfo_constructor(se::State& s) { @@ -4549,7 +4549,7 @@ static bool js_gfx_GFXSamplerInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXSamplerInfo* cobj = JSB_ALLOC(cocos2d::GFXSamplerInfo); + cc::GFXSamplerInfo* cobj = JSB_ALLOC(cc::GFXSamplerInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -4559,47 +4559,47 @@ static bool js_gfx_GFXSamplerInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXSamplerInfo* cobj = JSB_ALLOC(cocos2d::GFXSamplerInfo); - cocos2d::String arg0; + cc::GFXSamplerInfo* cobj = JSB_ALLOC(cc::GFXSamplerInfo); + cc::String arg0; json->getProperty("name", &field); if(!field.isUndefined()) { arg0 = field.toStringForce().c_str(); cobj->name = arg0; } - cocos2d::GFXFilter arg1; + cc::GFXFilter arg1; json->getProperty("minFilter", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXFilter)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXFilter)tmp; } while(false); cobj->minFilter = arg1; } - cocos2d::GFXFilter arg2; + cc::GFXFilter arg2; json->getProperty("magFilter", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXFilter)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXFilter)tmp; } while(false); cobj->magFilter = arg2; } - cocos2d::GFXFilter arg3; + cc::GFXFilter arg3; json->getProperty("mipFilter", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cocos2d::GFXFilter)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cc::GFXFilter)tmp; } while(false); cobj->mipFilter = arg3; } - cocos2d::GFXAddress arg4; + cc::GFXAddress arg4; json->getProperty("addressU", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cocos2d::GFXAddress)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cc::GFXAddress)tmp; } while(false); cobj->addressU = arg4; } - cocos2d::GFXAddress arg5; + cc::GFXAddress arg5; json->getProperty("addressV", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg5 = (cocos2d::GFXAddress)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg5 = (cc::GFXAddress)tmp; } while(false); cobj->addressV = arg5; } - cocos2d::GFXAddress arg6; + cc::GFXAddress arg6; json->getProperty("addressW", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg6 = (cocos2d::GFXAddress)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg6 = (cc::GFXAddress)tmp; } while(false); cobj->addressW = arg6; } unsigned int arg7 = 0; @@ -4608,13 +4608,13 @@ static bool js_gfx_GFXSamplerInfo_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg7); cobj->maxAnisotropy = arg7; } - cocos2d::GFXComparisonFunc arg8; + cc::GFXComparisonFunc arg8; json->getProperty("cmpFunc", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg8 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg8 = (cc::GFXComparisonFunc)tmp; } while(false); cobj->cmpFunc = arg8; } - cocos2d::GFXColor* arg9 = nullptr; + cc::GFXColor* arg9 = nullptr; json->getProperty("borderColor", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg9); @@ -4651,40 +4651,40 @@ static bool js_gfx_GFXSamplerInfo_constructor(se::State& s) } else if(argc == 13) { - cocos2d::GFXSamplerInfo* cobj = JSB_ALLOC(cocos2d::GFXSamplerInfo); - cocos2d::String arg0; + cc::GFXSamplerInfo* cobj = JSB_ALLOC(cc::GFXSamplerInfo); + cc::String arg0; if (!args[0].isUndefined()) { arg0 = args[0].toStringForce().c_str(); cobj->name = arg0; } - cocos2d::GFXFilter arg1; + cc::GFXFilter arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXFilter)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXFilter)tmp; } while(false); cobj->minFilter = arg1; } - cocos2d::GFXFilter arg2; + cc::GFXFilter arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXFilter)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXFilter)tmp; } while(false); cobj->magFilter = arg2; } - cocos2d::GFXFilter arg3; + cc::GFXFilter arg3; if (!args[3].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cocos2d::GFXFilter)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cc::GFXFilter)tmp; } while(false); cobj->mipFilter = arg3; } - cocos2d::GFXAddress arg4; + cc::GFXAddress arg4; if (!args[4].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cocos2d::GFXAddress)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cc::GFXAddress)tmp; } while(false); cobj->addressU = arg4; } - cocos2d::GFXAddress arg5; + cc::GFXAddress arg5; if (!args[5].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[5], &tmp); arg5 = (cocos2d::GFXAddress)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[5], &tmp); arg5 = (cc::GFXAddress)tmp; } while(false); cobj->addressV = arg5; } - cocos2d::GFXAddress arg6; + cc::GFXAddress arg6; if (!args[6].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[6], &tmp); arg6 = (cocos2d::GFXAddress)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[6], &tmp); arg6 = (cc::GFXAddress)tmp; } while(false); cobj->addressW = arg6; } unsigned int arg7 = 0; @@ -4692,12 +4692,12 @@ static bool js_gfx_GFXSamplerInfo_constructor(se::State& s) ok &= seval_to_uint32(args[7], (uint32_t*)&arg7); cobj->maxAnisotropy = arg7; } - cocos2d::GFXComparisonFunc arg8; + cc::GFXComparisonFunc arg8; if (!args[8].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[8], &tmp); arg8 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[8], &tmp); arg8 = (cc::GFXComparisonFunc)tmp; } while(false); cobj->cmpFunc = arg8; } - cocos2d::GFXColor* arg9 = nullptr; + cc::GFXColor* arg9 = nullptr; if (!args[9].isUndefined()) { ok &= seval_to_reference(args[9], &arg9); cobj->borderColor = *arg9; @@ -4732,24 +4732,24 @@ static bool js_gfx_GFXSamplerInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXSamplerInfo_constructor, __jsb_cocos2d_GFXSamplerInfo_class, js_cocos2d_GFXSamplerInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXSamplerInfo_constructor, __jsb_cc_GFXSamplerInfo_class, js_cc_GFXSamplerInfo_finalize) -static bool js_cocos2d_GFXSamplerInfo_finalize(se::State& s) +static bool js_cc_GFXSamplerInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXSamplerInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXSamplerInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXSamplerInfo* cobj = (cocos2d::GFXSamplerInfo*)s.nativeThisObject(); + cc::GFXSamplerInfo* cobj = (cc::GFXSamplerInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXSamplerInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXSamplerInfo_finalize) bool js_register_gfx_GFXSamplerInfo(se::Object* obj) { @@ -4768,23 +4768,23 @@ bool js_register_gfx_GFXSamplerInfo(se::Object* obj) cls->defineProperty("minLOD", _SE(js_gfx_GFXSamplerInfo_get_minLOD), _SE(js_gfx_GFXSamplerInfo_set_minLOD)); cls->defineProperty("maxLOD", _SE(js_gfx_GFXSamplerInfo_get_maxLOD), _SE(js_gfx_GFXSamplerInfo_set_maxLOD)); cls->defineProperty("mipLODBias", _SE(js_gfx_GFXSamplerInfo_get_mipLODBias), _SE(js_gfx_GFXSamplerInfo_set_mipLODBias)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXSamplerInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXSamplerInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXSamplerInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXSamplerInfo_class = cls; + __jsb_cc_GFXSamplerInfo_proto = cls->getProto(); + __jsb_cc_GFXSamplerInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXShaderMacro_proto = nullptr; -se::Class* __jsb_cocos2d_GFXShaderMacro_class = nullptr; +se::Object* __jsb_cc_GFXShaderMacro_proto = nullptr; +se::Class* __jsb_cc_GFXShaderMacro_class = nullptr; static bool js_gfx_GFXShaderMacro_get_macro(se::State& s) { - cocos2d::GFXShaderMacro* cobj = (cocos2d::GFXShaderMacro*)s.nativeThisObject(); + cc::GFXShaderMacro* cobj = (cc::GFXShaderMacro*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderMacro_get_macro : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4798,11 +4798,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderMacro_get_macro) static bool js_gfx_GFXShaderMacro_set_macro(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderMacro* cobj = (cocos2d::GFXShaderMacro*)s.nativeThisObject(); + cc::GFXShaderMacro* cobj = (cc::GFXShaderMacro*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderMacro_set_macro : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderMacro_set_macro : Error processing new value"); cobj->macro = arg0; @@ -4812,7 +4812,7 @@ SE_BIND_PROP_SET(js_gfx_GFXShaderMacro_set_macro) static bool js_gfx_GFXShaderMacro_get_value(se::State& s) { - cocos2d::GFXShaderMacro* cobj = (cocos2d::GFXShaderMacro*)s.nativeThisObject(); + cc::GFXShaderMacro* cobj = (cc::GFXShaderMacro*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderMacro_get_value : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4826,11 +4826,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderMacro_get_value) static bool js_gfx_GFXShaderMacro_set_value(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderMacro* cobj = (cocos2d::GFXShaderMacro*)s.nativeThisObject(); + cc::GFXShaderMacro* cobj = (cc::GFXShaderMacro*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderMacro_set_value : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderMacro_set_value : Error processing new value"); cobj->value = arg0; @@ -4838,7 +4838,7 @@ static bool js_gfx_GFXShaderMacro_set_value(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXShaderMacro_set_value) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXShaderMacro_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXShaderMacro_finalize) static bool js_gfx_GFXShaderMacro_constructor(se::State& s) { @@ -4848,7 +4848,7 @@ static bool js_gfx_GFXShaderMacro_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXShaderMacro* cobj = JSB_ALLOC(cocos2d::GFXShaderMacro); + cc::GFXShaderMacro* cobj = JSB_ALLOC(cc::GFXShaderMacro); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -4858,14 +4858,14 @@ static bool js_gfx_GFXShaderMacro_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXShaderMacro* cobj = JSB_ALLOC(cocos2d::GFXShaderMacro); - cocos2d::String arg0; + cc::GFXShaderMacro* cobj = JSB_ALLOC(cc::GFXShaderMacro); + cc::String arg0; json->getProperty("macro", &field); if(!field.isUndefined()) { arg0 = field.toStringForce().c_str(); cobj->macro = arg0; } - cocos2d::String arg1; + cc::String arg1; json->getProperty("value", &field); if(!field.isUndefined()) { arg1 = field.toStringForce().c_str(); @@ -4884,13 +4884,13 @@ static bool js_gfx_GFXShaderMacro_constructor(se::State& s) } else if(argc == 2) { - cocos2d::GFXShaderMacro* cobj = JSB_ALLOC(cocos2d::GFXShaderMacro); - cocos2d::String arg0; + cc::GFXShaderMacro* cobj = JSB_ALLOC(cc::GFXShaderMacro); + cc::String arg0; if (!args[0].isUndefined()) { arg0 = args[0].toStringForce().c_str(); cobj->macro = arg0; } - cocos2d::String arg1; + cc::String arg1; if (!args[1].isUndefined()) { arg1 = args[1].toStringForce().c_str(); cobj->value = arg1; @@ -4910,24 +4910,24 @@ static bool js_gfx_GFXShaderMacro_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXShaderMacro_constructor, __jsb_cocos2d_GFXShaderMacro_class, js_cocos2d_GFXShaderMacro_finalize) +SE_BIND_CTOR(js_gfx_GFXShaderMacro_constructor, __jsb_cc_GFXShaderMacro_class, js_cc_GFXShaderMacro_finalize) -static bool js_cocos2d_GFXShaderMacro_finalize(se::State& s) +static bool js_cc_GFXShaderMacro_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXShaderMacro)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXShaderMacro)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXShaderMacro* cobj = (cocos2d::GFXShaderMacro*)s.nativeThisObject(); + cc::GFXShaderMacro* cobj = (cc::GFXShaderMacro*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXShaderMacro_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXShaderMacro_finalize) bool js_register_gfx_GFXShaderMacro(se::Object* obj) { @@ -4935,23 +4935,23 @@ bool js_register_gfx_GFXShaderMacro(se::Object* obj) cls->defineProperty("macro", _SE(js_gfx_GFXShaderMacro_get_macro), _SE(js_gfx_GFXShaderMacro_set_macro)); cls->defineProperty("value", _SE(js_gfx_GFXShaderMacro_get_value), _SE(js_gfx_GFXShaderMacro_set_value)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXShaderMacro_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXShaderMacro_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXShaderMacro_proto = cls->getProto(); - __jsb_cocos2d_GFXShaderMacro_class = cls; + __jsb_cc_GFXShaderMacro_proto = cls->getProto(); + __jsb_cc_GFXShaderMacro_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXUniform_proto = nullptr; -se::Class* __jsb_cocos2d_GFXUniform_class = nullptr; +se::Object* __jsb_cc_GFXUniform_proto = nullptr; +se::Class* __jsb_cc_GFXUniform_class = nullptr; static bool js_gfx_GFXUniform_get_name(se::State& s) { - cocos2d::GFXUniform* cobj = (cocos2d::GFXUniform*)s.nativeThisObject(); + cc::GFXUniform* cobj = (cc::GFXUniform*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniform_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4965,11 +4965,11 @@ SE_BIND_PROP_GET(js_gfx_GFXUniform_get_name) static bool js_gfx_GFXUniform_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniform* cobj = (cocos2d::GFXUniform*)s.nativeThisObject(); + cc::GFXUniform* cobj = (cc::GFXUniform*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniform_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXUniform_set_name : Error processing new value"); cobj->name = arg0; @@ -4979,7 +4979,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniform_set_name) static bool js_gfx_GFXUniform_get_type(se::State& s) { - cocos2d::GFXUniform* cobj = (cocos2d::GFXUniform*)s.nativeThisObject(); + cc::GFXUniform* cobj = (cc::GFXUniform*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniform_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -4993,12 +4993,12 @@ SE_BIND_PROP_GET(js_gfx_GFXUniform_get_type) static bool js_gfx_GFXUniform_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniform* cobj = (cocos2d::GFXUniform*)s.nativeThisObject(); + cc::GFXUniform* cobj = (cc::GFXUniform*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniform_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXType)tmp; } while(false); + cc::GFXType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXUniform_set_type : Error processing new value"); cobj->type = arg0; return true; @@ -5007,7 +5007,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniform_set_type) static bool js_gfx_GFXUniform_get_count(se::State& s) { - cocos2d::GFXUniform* cobj = (cocos2d::GFXUniform*)s.nativeThisObject(); + cc::GFXUniform* cobj = (cc::GFXUniform*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniform_get_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5021,7 +5021,7 @@ SE_BIND_PROP_GET(js_gfx_GFXUniform_get_count) static bool js_gfx_GFXUniform_set_count(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniform* cobj = (cocos2d::GFXUniform*)s.nativeThisObject(); + cc::GFXUniform* cobj = (cc::GFXUniform*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniform_set_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5033,7 +5033,7 @@ static bool js_gfx_GFXUniform_set_count(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXUniform_set_count) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXUniform_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXUniform_finalize) static bool js_gfx_GFXUniform_constructor(se::State& s) { @@ -5043,7 +5043,7 @@ static bool js_gfx_GFXUniform_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXUniform* cobj = JSB_ALLOC(cocos2d::GFXUniform); + cc::GFXUniform* cobj = JSB_ALLOC(cc::GFXUniform); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -5053,17 +5053,17 @@ static bool js_gfx_GFXUniform_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXUniform* cobj = JSB_ALLOC(cocos2d::GFXUniform); - cocos2d::String arg0; + cc::GFXUniform* cobj = JSB_ALLOC(cc::GFXUniform); + cc::String arg0; json->getProperty("name", &field); if(!field.isUndefined()) { arg0 = field.toStringForce().c_str(); cobj->name = arg0; } - cocos2d::GFXType arg1; + cc::GFXType arg1; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXType)tmp; } while(false); cobj->type = arg1; } unsigned int arg2 = 0; @@ -5085,15 +5085,15 @@ static bool js_gfx_GFXUniform_constructor(se::State& s) } else if(argc == 3) { - cocos2d::GFXUniform* cobj = JSB_ALLOC(cocos2d::GFXUniform); - cocos2d::String arg0; + cc::GFXUniform* cobj = JSB_ALLOC(cc::GFXUniform); + cc::String arg0; if (!args[0].isUndefined()) { arg0 = args[0].toStringForce().c_str(); cobj->name = arg0; } - cocos2d::GFXType arg1; + cc::GFXType arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXType)tmp; } while(false); cobj->type = arg1; } unsigned int arg2 = 0; @@ -5116,24 +5116,24 @@ static bool js_gfx_GFXUniform_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXUniform_constructor, __jsb_cocos2d_GFXUniform_class, js_cocos2d_GFXUniform_finalize) +SE_BIND_CTOR(js_gfx_GFXUniform_constructor, __jsb_cc_GFXUniform_class, js_cc_GFXUniform_finalize) -static bool js_cocos2d_GFXUniform_finalize(se::State& s) +static bool js_cc_GFXUniform_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXUniform)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXUniform)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXUniform* cobj = (cocos2d::GFXUniform*)s.nativeThisObject(); + cc::GFXUniform* cobj = (cc::GFXUniform*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXUniform_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXUniform_finalize) bool js_register_gfx_GFXUniform(se::Object* obj) { @@ -5142,23 +5142,23 @@ bool js_register_gfx_GFXUniform(se::Object* obj) cls->defineProperty("name", _SE(js_gfx_GFXUniform_get_name), _SE(js_gfx_GFXUniform_set_name)); cls->defineProperty("type", _SE(js_gfx_GFXUniform_get_type), _SE(js_gfx_GFXUniform_set_type)); cls->defineProperty("count", _SE(js_gfx_GFXUniform_get_count), _SE(js_gfx_GFXUniform_set_count)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXUniform_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXUniform_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXUniform_proto = cls->getProto(); - __jsb_cocos2d_GFXUniform_class = cls; + __jsb_cc_GFXUniform_proto = cls->getProto(); + __jsb_cc_GFXUniform_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXUniformBlock_proto = nullptr; -se::Class* __jsb_cocos2d_GFXUniformBlock_class = nullptr; +se::Object* __jsb_cc_GFXUniformBlock_proto = nullptr; +se::Class* __jsb_cc_GFXUniformBlock_class = nullptr; static bool js_gfx_GFXUniformBlock_get_shaderStages(se::State& s) { - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformBlock_get_shaderStages : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5172,12 +5172,12 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformBlock_get_shaderStages) static bool js_gfx_GFXUniformBlock_set_shaderStages(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformBlock_set_shaderStages : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXShaderType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + cc::GFXShaderType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXUniformBlock_set_shaderStages : Error processing new value"); cobj->shaderStages = arg0; return true; @@ -5186,7 +5186,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniformBlock_set_shaderStages) static bool js_gfx_GFXUniformBlock_get_binding(se::State& s) { - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformBlock_get_binding : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5200,7 +5200,7 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformBlock_get_binding) static bool js_gfx_GFXUniformBlock_set_binding(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformBlock_set_binding : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5214,7 +5214,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniformBlock_set_binding) static bool js_gfx_GFXUniformBlock_get_name(se::State& s) { - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformBlock_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5228,11 +5228,11 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformBlock_get_name) static bool js_gfx_GFXUniformBlock_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformBlock_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXUniformBlock_set_name : Error processing new value"); cobj->name = arg0; @@ -5242,7 +5242,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniformBlock_set_name) static bool js_gfx_GFXUniformBlock_get_uniforms(se::State& s) { - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformBlock_get_uniforms : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5256,11 +5256,11 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformBlock_get_uniforms) static bool js_gfx_GFXUniformBlock_set_uniforms(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformBlock_set_uniforms : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXUniformBlock_set_uniforms : Error processing new value"); cobj->uniforms = arg0; @@ -5268,7 +5268,7 @@ static bool js_gfx_GFXUniformBlock_set_uniforms(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXUniformBlock_set_uniforms) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXUniformBlock_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXUniformBlock_finalize) static bool js_gfx_GFXUniformBlock_constructor(se::State& s) { @@ -5278,7 +5278,7 @@ static bool js_gfx_GFXUniformBlock_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXUniformBlock* cobj = JSB_ALLOC(cocos2d::GFXUniformBlock); + cc::GFXUniformBlock* cobj = JSB_ALLOC(cc::GFXUniformBlock); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -5288,11 +5288,11 @@ static bool js_gfx_GFXUniformBlock_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXUniformBlock* cobj = JSB_ALLOC(cocos2d::GFXUniformBlock); - cocos2d::GFXShaderType arg0; + cc::GFXUniformBlock* cobj = JSB_ALLOC(cc::GFXUniformBlock); + cc::GFXShaderType arg0; json->getProperty("shaderStages", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderStages = arg0; } unsigned int arg1 = 0; @@ -5301,13 +5301,13 @@ static bool js_gfx_GFXUniformBlock_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg1); cobj->binding = arg1; } - cocos2d::String arg2; + cc::String arg2; json->getProperty("name", &field); if(!field.isUndefined()) { arg2 = field.toStringForce().c_str(); cobj->name = arg2; } - std::vector arg3; + std::vector arg3; json->getProperty("uniforms", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg3); @@ -5326,10 +5326,10 @@ static bool js_gfx_GFXUniformBlock_constructor(se::State& s) } else if(argc == 4) { - cocos2d::GFXUniformBlock* cobj = JSB_ALLOC(cocos2d::GFXUniformBlock); - cocos2d::GFXShaderType arg0; + cc::GFXUniformBlock* cobj = JSB_ALLOC(cc::GFXUniformBlock); + cc::GFXShaderType arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderStages = arg0; } unsigned int arg1 = 0; @@ -5337,12 +5337,12 @@ static bool js_gfx_GFXUniformBlock_constructor(se::State& s) ok &= seval_to_uint32(args[1], (uint32_t*)&arg1); cobj->binding = arg1; } - cocos2d::String arg2; + cc::String arg2; if (!args[2].isUndefined()) { arg2 = args[2].toStringForce().c_str(); cobj->name = arg2; } - std::vector arg3; + std::vector arg3; if (!args[3].isUndefined()) { ok &= seval_to_std_vector(args[3], &arg3); cobj->uniforms = arg3; @@ -5362,24 +5362,24 @@ static bool js_gfx_GFXUniformBlock_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXUniformBlock_constructor, __jsb_cocos2d_GFXUniformBlock_class, js_cocos2d_GFXUniformBlock_finalize) +SE_BIND_CTOR(js_gfx_GFXUniformBlock_constructor, __jsb_cc_GFXUniformBlock_class, js_cc_GFXUniformBlock_finalize) -static bool js_cocos2d_GFXUniformBlock_finalize(se::State& s) +static bool js_cc_GFXUniformBlock_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXUniformBlock)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXUniformBlock)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXUniformBlock* cobj = (cocos2d::GFXUniformBlock*)s.nativeThisObject(); + cc::GFXUniformBlock* cobj = (cc::GFXUniformBlock*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXUniformBlock_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXUniformBlock_finalize) bool js_register_gfx_GFXUniformBlock(se::Object* obj) { @@ -5389,23 +5389,23 @@ bool js_register_gfx_GFXUniformBlock(se::Object* obj) cls->defineProperty("binding", _SE(js_gfx_GFXUniformBlock_get_binding), _SE(js_gfx_GFXUniformBlock_set_binding)); cls->defineProperty("name", _SE(js_gfx_GFXUniformBlock_get_name), _SE(js_gfx_GFXUniformBlock_set_name)); cls->defineProperty("uniforms", _SE(js_gfx_GFXUniformBlock_get_uniforms), _SE(js_gfx_GFXUniformBlock_set_uniforms)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXUniformBlock_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXUniformBlock_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXUniformBlock_proto = cls->getProto(); - __jsb_cocos2d_GFXUniformBlock_class = cls; + __jsb_cc_GFXUniformBlock_proto = cls->getProto(); + __jsb_cc_GFXUniformBlock_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXUniformSampler_proto = nullptr; -se::Class* __jsb_cocos2d_GFXUniformSampler_class = nullptr; +se::Object* __jsb_cc_GFXUniformSampler_proto = nullptr; +se::Class* __jsb_cc_GFXUniformSampler_class = nullptr; static bool js_gfx_GFXUniformSampler_get_shaderStages(se::State& s) { - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_get_shaderStages : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5419,12 +5419,12 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformSampler_get_shaderStages) static bool js_gfx_GFXUniformSampler_set_shaderStages(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_set_shaderStages : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXShaderType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + cc::GFXShaderType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXUniformSampler_set_shaderStages : Error processing new value"); cobj->shaderStages = arg0; return true; @@ -5433,7 +5433,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniformSampler_set_shaderStages) static bool js_gfx_GFXUniformSampler_get_binding(se::State& s) { - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_get_binding : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5447,7 +5447,7 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformSampler_get_binding) static bool js_gfx_GFXUniformSampler_set_binding(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_set_binding : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5461,7 +5461,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniformSampler_set_binding) static bool js_gfx_GFXUniformSampler_get_name(se::State& s) { - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5475,11 +5475,11 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformSampler_get_name) static bool js_gfx_GFXUniformSampler_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXUniformSampler_set_name : Error processing new value"); cobj->name = arg0; @@ -5489,7 +5489,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniformSampler_set_name) static bool js_gfx_GFXUniformSampler_get_type(se::State& s) { - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5503,12 +5503,12 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformSampler_get_type) static bool js_gfx_GFXUniformSampler_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXType)tmp; } while(false); + cc::GFXType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXUniformSampler_set_type : Error processing new value"); cobj->type = arg0; return true; @@ -5517,7 +5517,7 @@ SE_BIND_PROP_SET(js_gfx_GFXUniformSampler_set_type) static bool js_gfx_GFXUniformSampler_get_count(se::State& s) { - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_get_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5531,7 +5531,7 @@ SE_BIND_PROP_GET(js_gfx_GFXUniformSampler_get_count) static bool js_gfx_GFXUniformSampler_set_count(se::State& s) { const auto& args = s.args(); - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXUniformSampler_set_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5543,7 +5543,7 @@ static bool js_gfx_GFXUniformSampler_set_count(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXUniformSampler_set_count) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXUniformSampler_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXUniformSampler_finalize) static bool js_gfx_GFXUniformSampler_constructor(se::State& s) { @@ -5553,7 +5553,7 @@ static bool js_gfx_GFXUniformSampler_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXUniformSampler* cobj = JSB_ALLOC(cocos2d::GFXUniformSampler); + cc::GFXUniformSampler* cobj = JSB_ALLOC(cc::GFXUniformSampler); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -5563,11 +5563,11 @@ static bool js_gfx_GFXUniformSampler_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXUniformSampler* cobj = JSB_ALLOC(cocos2d::GFXUniformSampler); - cocos2d::GFXShaderType arg0; + cc::GFXUniformSampler* cobj = JSB_ALLOC(cc::GFXUniformSampler); + cc::GFXShaderType arg0; json->getProperty("shaderStages", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderStages = arg0; } unsigned int arg1 = 0; @@ -5576,16 +5576,16 @@ static bool js_gfx_GFXUniformSampler_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg1); cobj->binding = arg1; } - cocos2d::String arg2; + cc::String arg2; json->getProperty("name", &field); if(!field.isUndefined()) { arg2 = field.toStringForce().c_str(); cobj->name = arg2; } - cocos2d::GFXType arg3; + cc::GFXType arg3; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cocos2d::GFXType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cc::GFXType)tmp; } while(false); cobj->type = arg3; } unsigned int arg4 = 0; @@ -5607,10 +5607,10 @@ static bool js_gfx_GFXUniformSampler_constructor(se::State& s) } else if(argc == 5) { - cocos2d::GFXUniformSampler* cobj = JSB_ALLOC(cocos2d::GFXUniformSampler); - cocos2d::GFXShaderType arg0; + cc::GFXUniformSampler* cobj = JSB_ALLOC(cc::GFXUniformSampler); + cc::GFXShaderType arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderStages = arg0; } unsigned int arg1 = 0; @@ -5618,14 +5618,14 @@ static bool js_gfx_GFXUniformSampler_constructor(se::State& s) ok &= seval_to_uint32(args[1], (uint32_t*)&arg1); cobj->binding = arg1; } - cocos2d::String arg2; + cc::String arg2; if (!args[2].isUndefined()) { arg2 = args[2].toStringForce().c_str(); cobj->name = arg2; } - cocos2d::GFXType arg3; + cc::GFXType arg3; if (!args[3].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cocos2d::GFXType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cc::GFXType)tmp; } while(false); cobj->type = arg3; } unsigned int arg4 = 0; @@ -5648,24 +5648,24 @@ static bool js_gfx_GFXUniformSampler_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXUniformSampler_constructor, __jsb_cocos2d_GFXUniformSampler_class, js_cocos2d_GFXUniformSampler_finalize) +SE_BIND_CTOR(js_gfx_GFXUniformSampler_constructor, __jsb_cc_GFXUniformSampler_class, js_cc_GFXUniformSampler_finalize) -static bool js_cocos2d_GFXUniformSampler_finalize(se::State& s) +static bool js_cc_GFXUniformSampler_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXUniformSampler)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXUniformSampler)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXUniformSampler* cobj = (cocos2d::GFXUniformSampler*)s.nativeThisObject(); + cc::GFXUniformSampler* cobj = (cc::GFXUniformSampler*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXUniformSampler_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXUniformSampler_finalize) bool js_register_gfx_GFXUniformSampler(se::Object* obj) { @@ -5676,23 +5676,23 @@ bool js_register_gfx_GFXUniformSampler(se::Object* obj) cls->defineProperty("name", _SE(js_gfx_GFXUniformSampler_get_name), _SE(js_gfx_GFXUniformSampler_set_name)); cls->defineProperty("type", _SE(js_gfx_GFXUniformSampler_get_type), _SE(js_gfx_GFXUniformSampler_set_type)); cls->defineProperty("count", _SE(js_gfx_GFXUniformSampler_get_count), _SE(js_gfx_GFXUniformSampler_set_count)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXUniformSampler_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXUniformSampler_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXUniformSampler_proto = cls->getProto(); - __jsb_cocos2d_GFXUniformSampler_class = cls; + __jsb_cc_GFXUniformSampler_proto = cls->getProto(); + __jsb_cc_GFXUniformSampler_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXShaderStage_proto = nullptr; -se::Class* __jsb_cocos2d_GFXShaderStage_class = nullptr; +se::Object* __jsb_cc_GFXShaderStage_proto = nullptr; +se::Class* __jsb_cc_GFXShaderStage_class = nullptr; static bool js_gfx_GFXShaderStage_get_type(se::State& s) { - cocos2d::GFXShaderStage* cobj = (cocos2d::GFXShaderStage*)s.nativeThisObject(); + cc::GFXShaderStage* cobj = (cc::GFXShaderStage*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderStage_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5706,12 +5706,12 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderStage_get_type) static bool js_gfx_GFXShaderStage_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderStage* cobj = (cocos2d::GFXShaderStage*)s.nativeThisObject(); + cc::GFXShaderStage* cobj = (cc::GFXShaderStage*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderStage_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXShaderType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + cc::GFXShaderType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderStage_set_type : Error processing new value"); cobj->type = arg0; return true; @@ -5720,7 +5720,7 @@ SE_BIND_PROP_SET(js_gfx_GFXShaderStage_set_type) static bool js_gfx_GFXShaderStage_get_source(se::State& s) { - cocos2d::GFXShaderStage* cobj = (cocos2d::GFXShaderStage*)s.nativeThisObject(); + cc::GFXShaderStage* cobj = (cc::GFXShaderStage*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderStage_get_source : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5734,11 +5734,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderStage_get_source) static bool js_gfx_GFXShaderStage_set_source(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderStage* cobj = (cocos2d::GFXShaderStage*)s.nativeThisObject(); + cc::GFXShaderStage* cobj = (cc::GFXShaderStage*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderStage_set_source : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderStage_set_source : Error processing new value"); cobj->source = arg0; @@ -5748,7 +5748,7 @@ SE_BIND_PROP_SET(js_gfx_GFXShaderStage_set_source) static bool js_gfx_GFXShaderStage_get_macros(se::State& s) { - cocos2d::GFXShaderStage* cobj = (cocos2d::GFXShaderStage*)s.nativeThisObject(); + cc::GFXShaderStage* cobj = (cc::GFXShaderStage*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderStage_get_macros : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5762,11 +5762,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderStage_get_macros) static bool js_gfx_GFXShaderStage_set_macros(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderStage* cobj = (cocos2d::GFXShaderStage*)s.nativeThisObject(); + cc::GFXShaderStage* cobj = (cc::GFXShaderStage*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderStage_set_macros : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderStage_set_macros : Error processing new value"); cobj->macros = arg0; @@ -5774,7 +5774,7 @@ static bool js_gfx_GFXShaderStage_set_macros(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXShaderStage_set_macros) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXShaderStage_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXShaderStage_finalize) static bool js_gfx_GFXShaderStage_constructor(se::State& s) { @@ -5784,7 +5784,7 @@ static bool js_gfx_GFXShaderStage_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXShaderStage* cobj = JSB_ALLOC(cocos2d::GFXShaderStage); + cc::GFXShaderStage* cobj = JSB_ALLOC(cc::GFXShaderStage); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -5794,20 +5794,20 @@ static bool js_gfx_GFXShaderStage_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXShaderStage* cobj = JSB_ALLOC(cocos2d::GFXShaderStage); - cocos2d::GFXShaderType arg0; + cc::GFXShaderStage* cobj = JSB_ALLOC(cc::GFXShaderStage); + cc::GFXShaderType arg0; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->type = arg0; } - cocos2d::String arg1; + cc::String arg1; json->getProperty("source", &field); if(!field.isUndefined()) { arg1 = field.toStringForce().c_str(); cobj->source = arg1; } - std::vector arg2; + std::vector arg2; json->getProperty("macros", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg2); @@ -5826,18 +5826,18 @@ static bool js_gfx_GFXShaderStage_constructor(se::State& s) } else if(argc == 3) { - cocos2d::GFXShaderStage* cobj = JSB_ALLOC(cocos2d::GFXShaderStage); - cocos2d::GFXShaderType arg0; + cc::GFXShaderStage* cobj = JSB_ALLOC(cc::GFXShaderStage); + cc::GFXShaderType arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->type = arg0; } - cocos2d::String arg1; + cc::String arg1; if (!args[1].isUndefined()) { arg1 = args[1].toStringForce().c_str(); cobj->source = arg1; } - std::vector arg2; + std::vector arg2; if (!args[2].isUndefined()) { ok &= seval_to_std_vector(args[2], &arg2); cobj->macros = arg2; @@ -5857,24 +5857,24 @@ static bool js_gfx_GFXShaderStage_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXShaderStage_constructor, __jsb_cocos2d_GFXShaderStage_class, js_cocos2d_GFXShaderStage_finalize) +SE_BIND_CTOR(js_gfx_GFXShaderStage_constructor, __jsb_cc_GFXShaderStage_class, js_cc_GFXShaderStage_finalize) -static bool js_cocos2d_GFXShaderStage_finalize(se::State& s) +static bool js_cc_GFXShaderStage_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXShaderStage)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXShaderStage)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXShaderStage* cobj = (cocos2d::GFXShaderStage*)s.nativeThisObject(); + cc::GFXShaderStage* cobj = (cc::GFXShaderStage*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXShaderStage_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXShaderStage_finalize) bool js_register_gfx_GFXShaderStage(se::Object* obj) { @@ -5883,23 +5883,23 @@ bool js_register_gfx_GFXShaderStage(se::Object* obj) cls->defineProperty("type", _SE(js_gfx_GFXShaderStage_get_type), _SE(js_gfx_GFXShaderStage_set_type)); cls->defineProperty("source", _SE(js_gfx_GFXShaderStage_get_source), _SE(js_gfx_GFXShaderStage_set_source)); cls->defineProperty("macros", _SE(js_gfx_GFXShaderStage_get_macros), _SE(js_gfx_GFXShaderStage_set_macros)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXShaderStage_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXShaderStage_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXShaderStage_proto = cls->getProto(); - __jsb_cocos2d_GFXShaderStage_class = cls; + __jsb_cc_GFXShaderStage_proto = cls->getProto(); + __jsb_cc_GFXShaderStage_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXAttribute_proto = nullptr; -se::Class* __jsb_cocos2d_GFXAttribute_class = nullptr; +se::Object* __jsb_cc_GFXAttribute_proto = nullptr; +se::Class* __jsb_cc_GFXAttribute_class = nullptr; static bool js_gfx_GFXAttribute_get_name(se::State& s) { - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5913,11 +5913,11 @@ SE_BIND_PROP_GET(js_gfx_GFXAttribute_get_name) static bool js_gfx_GFXAttribute_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXAttribute_set_name : Error processing new value"); cobj->name = arg0; @@ -5927,7 +5927,7 @@ SE_BIND_PROP_SET(js_gfx_GFXAttribute_set_name) static bool js_gfx_GFXAttribute_get_format(se::State& s) { - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_get_format : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5941,12 +5941,12 @@ SE_BIND_PROP_GET(js_gfx_GFXAttribute_get_format) static bool js_gfx_GFXAttribute_set_format(se::State& s) { const auto& args = s.args(); - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_set_format : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFormat arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + cc::GFXFormat arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXAttribute_set_format : Error processing new value"); cobj->format = arg0; return true; @@ -5955,7 +5955,7 @@ SE_BIND_PROP_SET(js_gfx_GFXAttribute_set_format) static bool js_gfx_GFXAttribute_get_isNormalized(se::State& s) { - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_get_isNormalized : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5969,7 +5969,7 @@ SE_BIND_PROP_GET(js_gfx_GFXAttribute_get_isNormalized) static bool js_gfx_GFXAttribute_set_isNormalized(se::State& s) { const auto& args = s.args(); - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_set_isNormalized : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5983,7 +5983,7 @@ SE_BIND_PROP_SET(js_gfx_GFXAttribute_set_isNormalized) static bool js_gfx_GFXAttribute_get_stream(se::State& s) { - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_get_stream : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -5997,7 +5997,7 @@ SE_BIND_PROP_GET(js_gfx_GFXAttribute_get_stream) static bool js_gfx_GFXAttribute_set_stream(se::State& s) { const auto& args = s.args(); - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_set_stream : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6011,7 +6011,7 @@ SE_BIND_PROP_SET(js_gfx_GFXAttribute_set_stream) static bool js_gfx_GFXAttribute_get_isInstanced(se::State& s) { - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_get_isInstanced : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6025,7 +6025,7 @@ SE_BIND_PROP_GET(js_gfx_GFXAttribute_get_isInstanced) static bool js_gfx_GFXAttribute_set_isInstanced(se::State& s) { const auto& args = s.args(); - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_set_isInstanced : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6039,7 +6039,7 @@ SE_BIND_PROP_SET(js_gfx_GFXAttribute_set_isInstanced) static bool js_gfx_GFXAttribute_get_location(se::State& s) { - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_get_location : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6053,7 +6053,7 @@ SE_BIND_PROP_GET(js_gfx_GFXAttribute_get_location) static bool js_gfx_GFXAttribute_set_location(se::State& s) { const auto& args = s.args(); - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXAttribute_set_location : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6065,7 +6065,7 @@ static bool js_gfx_GFXAttribute_set_location(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXAttribute_set_location) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXAttribute_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXAttribute_finalize) static bool js_gfx_GFXAttribute_constructor(se::State& s) { @@ -6075,7 +6075,7 @@ static bool js_gfx_GFXAttribute_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXAttribute* cobj = JSB_ALLOC(cocos2d::GFXAttribute); + cc::GFXAttribute* cobj = JSB_ALLOC(cc::GFXAttribute); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -6085,17 +6085,17 @@ static bool js_gfx_GFXAttribute_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXAttribute* cobj = JSB_ALLOC(cocos2d::GFXAttribute); - cocos2d::String arg0; + cc::GFXAttribute* cobj = JSB_ALLOC(cc::GFXAttribute); + cc::String arg0; json->getProperty("name", &field); if(!field.isUndefined()) { arg0 = field.toStringForce().c_str(); cobj->name = arg0; } - cocos2d::GFXFormat arg1; + cc::GFXFormat arg1; json->getProperty("format", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg1; } bool arg2; @@ -6135,15 +6135,15 @@ static bool js_gfx_GFXAttribute_constructor(se::State& s) } else if(argc == 6) { - cocos2d::GFXAttribute* cobj = JSB_ALLOC(cocos2d::GFXAttribute); - cocos2d::String arg0; + cc::GFXAttribute* cobj = JSB_ALLOC(cc::GFXAttribute); + cc::String arg0; if (!args[0].isUndefined()) { arg0 = args[0].toStringForce().c_str(); cobj->name = arg0; } - cocos2d::GFXFormat arg1; + cc::GFXFormat arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg1; } bool arg2; @@ -6181,24 +6181,24 @@ static bool js_gfx_GFXAttribute_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXAttribute_constructor, __jsb_cocos2d_GFXAttribute_class, js_cocos2d_GFXAttribute_finalize) +SE_BIND_CTOR(js_gfx_GFXAttribute_constructor, __jsb_cc_GFXAttribute_class, js_cc_GFXAttribute_finalize) -static bool js_cocos2d_GFXAttribute_finalize(se::State& s) +static bool js_cc_GFXAttribute_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXAttribute)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXAttribute)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXAttribute* cobj = (cocos2d::GFXAttribute*)s.nativeThisObject(); + cc::GFXAttribute* cobj = (cc::GFXAttribute*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXAttribute_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXAttribute_finalize) bool js_register_gfx_GFXAttribute(se::Object* obj) { @@ -6210,23 +6210,23 @@ bool js_register_gfx_GFXAttribute(se::Object* obj) cls->defineProperty("stream", _SE(js_gfx_GFXAttribute_get_stream), _SE(js_gfx_GFXAttribute_set_stream)); cls->defineProperty("isInstanced", _SE(js_gfx_GFXAttribute_get_isInstanced), _SE(js_gfx_GFXAttribute_set_isInstanced)); cls->defineProperty("location", _SE(js_gfx_GFXAttribute_get_location), _SE(js_gfx_GFXAttribute_set_location)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXAttribute_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXAttribute_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXAttribute_proto = cls->getProto(); - __jsb_cocos2d_GFXAttribute_class = cls; + __jsb_cc_GFXAttribute_proto = cls->getProto(); + __jsb_cc_GFXAttribute_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXShaderInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXShaderInfo_class = nullptr; +se::Object* __jsb_cc_GFXShaderInfo_proto = nullptr; +se::Class* __jsb_cc_GFXShaderInfo_class = nullptr; static bool js_gfx_GFXShaderInfo_get_name(se::State& s) { - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6240,11 +6240,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderInfo_get_name) static bool js_gfx_GFXShaderInfo_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderInfo_set_name : Error processing new value"); cobj->name = arg0; @@ -6254,7 +6254,7 @@ SE_BIND_PROP_SET(js_gfx_GFXShaderInfo_set_name) static bool js_gfx_GFXShaderInfo_get_stages(se::State& s) { - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_get_stages : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6268,11 +6268,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderInfo_get_stages) static bool js_gfx_GFXShaderInfo_set_stages(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_set_stages : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderInfo_set_stages : Error processing new value"); cobj->stages = arg0; @@ -6282,7 +6282,7 @@ SE_BIND_PROP_SET(js_gfx_GFXShaderInfo_set_stages) static bool js_gfx_GFXShaderInfo_get_attributes(se::State& s) { - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_get_attributes : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6296,11 +6296,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderInfo_get_attributes) static bool js_gfx_GFXShaderInfo_set_attributes(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_set_attributes : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderInfo_set_attributes : Error processing new value"); cobj->attributes = arg0; @@ -6310,7 +6310,7 @@ SE_BIND_PROP_SET(js_gfx_GFXShaderInfo_set_attributes) static bool js_gfx_GFXShaderInfo_get_blocks(se::State& s) { - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_get_blocks : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6324,11 +6324,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderInfo_get_blocks) static bool js_gfx_GFXShaderInfo_set_blocks(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_set_blocks : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderInfo_set_blocks : Error processing new value"); cobj->blocks = arg0; @@ -6338,7 +6338,7 @@ SE_BIND_PROP_SET(js_gfx_GFXShaderInfo_set_blocks) static bool js_gfx_GFXShaderInfo_get_samplers(se::State& s) { - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_get_samplers : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6352,11 +6352,11 @@ SE_BIND_PROP_GET(js_gfx_GFXShaderInfo_get_samplers) static bool js_gfx_GFXShaderInfo_set_samplers(se::State& s) { const auto& args = s.args(); - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShaderInfo_set_samplers : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXShaderInfo_set_samplers : Error processing new value"); cobj->samplers = arg0; @@ -6364,7 +6364,7 @@ static bool js_gfx_GFXShaderInfo_set_samplers(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXShaderInfo_set_samplers) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXShaderInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXShaderInfo_finalize) static bool js_gfx_GFXShaderInfo_constructor(se::State& s) { @@ -6374,7 +6374,7 @@ static bool js_gfx_GFXShaderInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXShaderInfo* cobj = JSB_ALLOC(cocos2d::GFXShaderInfo); + cc::GFXShaderInfo* cobj = JSB_ALLOC(cc::GFXShaderInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -6384,32 +6384,32 @@ static bool js_gfx_GFXShaderInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXShaderInfo* cobj = JSB_ALLOC(cocos2d::GFXShaderInfo); - cocos2d::String arg0; + cc::GFXShaderInfo* cobj = JSB_ALLOC(cc::GFXShaderInfo); + cc::String arg0; json->getProperty("name", &field); if(!field.isUndefined()) { arg0 = field.toStringForce().c_str(); cobj->name = arg0; } - std::vector arg1; + std::vector arg1; json->getProperty("stages", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg1); cobj->stages = arg1; } - std::vector arg2; + std::vector arg2; json->getProperty("attributes", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg2); cobj->attributes = arg2; } - std::vector arg3; + std::vector arg3; json->getProperty("blocks", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg3); cobj->blocks = arg3; } - std::vector arg4; + std::vector arg4; json->getProperty("samplers", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg4); @@ -6428,28 +6428,28 @@ static bool js_gfx_GFXShaderInfo_constructor(se::State& s) } else if(argc == 5) { - cocos2d::GFXShaderInfo* cobj = JSB_ALLOC(cocos2d::GFXShaderInfo); - cocos2d::String arg0; + cc::GFXShaderInfo* cobj = JSB_ALLOC(cc::GFXShaderInfo); + cc::String arg0; if (!args[0].isUndefined()) { arg0 = args[0].toStringForce().c_str(); cobj->name = arg0; } - std::vector arg1; + std::vector arg1; if (!args[1].isUndefined()) { ok &= seval_to_std_vector(args[1], &arg1); cobj->stages = arg1; } - std::vector arg2; + std::vector arg2; if (!args[2].isUndefined()) { ok &= seval_to_std_vector(args[2], &arg2); cobj->attributes = arg2; } - std::vector arg3; + std::vector arg3; if (!args[3].isUndefined()) { ok &= seval_to_std_vector(args[3], &arg3); cobj->blocks = arg3; } - std::vector arg4; + std::vector arg4; if (!args[4].isUndefined()) { ok &= seval_to_std_vector(args[4], &arg4); cobj->samplers = arg4; @@ -6469,24 +6469,24 @@ static bool js_gfx_GFXShaderInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXShaderInfo_constructor, __jsb_cocos2d_GFXShaderInfo_class, js_cocos2d_GFXShaderInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXShaderInfo_constructor, __jsb_cc_GFXShaderInfo_class, js_cc_GFXShaderInfo_finalize) -static bool js_cocos2d_GFXShaderInfo_finalize(se::State& s) +static bool js_cc_GFXShaderInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXShaderInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXShaderInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXShaderInfo* cobj = (cocos2d::GFXShaderInfo*)s.nativeThisObject(); + cc::GFXShaderInfo* cobj = (cc::GFXShaderInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXShaderInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXShaderInfo_finalize) bool js_register_gfx_GFXShaderInfo(se::Object* obj) { @@ -6497,23 +6497,23 @@ bool js_register_gfx_GFXShaderInfo(se::Object* obj) cls->defineProperty("attributes", _SE(js_gfx_GFXShaderInfo_get_attributes), _SE(js_gfx_GFXShaderInfo_set_attributes)); cls->defineProperty("blocks", _SE(js_gfx_GFXShaderInfo_get_blocks), _SE(js_gfx_GFXShaderInfo_set_blocks)); cls->defineProperty("samplers", _SE(js_gfx_GFXShaderInfo_get_samplers), _SE(js_gfx_GFXShaderInfo_set_samplers)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXShaderInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXShaderInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXShaderInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXShaderInfo_class = cls; + __jsb_cc_GFXShaderInfo_proto = cls->getProto(); + __jsb_cc_GFXShaderInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXInputAssemblerInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXInputAssemblerInfo_class = nullptr; +se::Object* __jsb_cc_GFXInputAssemblerInfo_proto = nullptr; +se::Class* __jsb_cc_GFXInputAssemblerInfo_class = nullptr; static bool js_gfx_GFXInputAssemblerInfo_get_attributes(se::State& s) { - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssemblerInfo_get_attributes : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6527,11 +6527,11 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssemblerInfo_get_attributes) static bool js_gfx_GFXInputAssemblerInfo_set_attributes(se::State& s) { const auto& args = s.args(); - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssemblerInfo_set_attributes : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssemblerInfo_set_attributes : Error processing new value"); cobj->attributes = arg0; @@ -6541,7 +6541,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssemblerInfo_set_attributes) static bool js_gfx_GFXInputAssemblerInfo_get_vertexBuffers(se::State& s) { - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssemblerInfo_get_vertexBuffers : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6555,11 +6555,11 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssemblerInfo_get_vertexBuffers) static bool js_gfx_GFXInputAssemblerInfo_set_vertexBuffers(se::State& s) { const auto& args = s.args(); - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssemblerInfo_set_vertexBuffers : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssemblerInfo_set_vertexBuffers : Error processing new value"); cobj->vertexBuffers = arg0; @@ -6569,7 +6569,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssemblerInfo_set_vertexBuffers) static bool js_gfx_GFXInputAssemblerInfo_get_indexBuffer(se::State& s) { - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssemblerInfo_get_indexBuffer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6583,11 +6583,11 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssemblerInfo_get_indexBuffer) static bool js_gfx_GFXInputAssemblerInfo_set_indexBuffer(se::State& s) { const auto& args = s.args(); - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssemblerInfo_set_indexBuffer : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBuffer* arg0 = nullptr; + cc::GFXBuffer* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssemblerInfo_set_indexBuffer : Error processing new value"); cobj->indexBuffer = arg0; @@ -6597,7 +6597,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssemblerInfo_set_indexBuffer) static bool js_gfx_GFXInputAssemblerInfo_get_indirectBuffer(se::State& s) { - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssemblerInfo_get_indirectBuffer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6611,11 +6611,11 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssemblerInfo_get_indirectBuffer) static bool js_gfx_GFXInputAssemblerInfo_set_indirectBuffer(se::State& s) { const auto& args = s.args(); - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssemblerInfo_set_indirectBuffer : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBuffer* arg0 = nullptr; + cc::GFXBuffer* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssemblerInfo_set_indirectBuffer : Error processing new value"); cobj->indirectBuffer = arg0; @@ -6623,7 +6623,7 @@ static bool js_gfx_GFXInputAssemblerInfo_set_indirectBuffer(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXInputAssemblerInfo_set_indirectBuffer) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXInputAssemblerInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXInputAssemblerInfo_finalize) static bool js_gfx_GFXInputAssemblerInfo_constructor(se::State& s) { @@ -6633,7 +6633,7 @@ static bool js_gfx_GFXInputAssemblerInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXInputAssemblerInfo* cobj = JSB_ALLOC(cocos2d::GFXInputAssemblerInfo); + cc::GFXInputAssemblerInfo* cobj = JSB_ALLOC(cc::GFXInputAssemblerInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -6643,26 +6643,26 @@ static bool js_gfx_GFXInputAssemblerInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXInputAssemblerInfo* cobj = JSB_ALLOC(cocos2d::GFXInputAssemblerInfo); - std::vector arg0; + cc::GFXInputAssemblerInfo* cobj = JSB_ALLOC(cc::GFXInputAssemblerInfo); + std::vector arg0; json->getProperty("attributes", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg0); cobj->attributes = arg0; } - std::vector arg1; + std::vector arg1; json->getProperty("vertexBuffers", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg1); cobj->vertexBuffers = arg1; } - cocos2d::GFXBuffer* arg2 = nullptr; + cc::GFXBuffer* arg2 = nullptr; json->getProperty("indexBuffer", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg2); cobj->indexBuffer = arg2; } - cocos2d::GFXBuffer* arg3 = nullptr; + cc::GFXBuffer* arg3 = nullptr; json->getProperty("indirectBuffer", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg3); @@ -6681,23 +6681,23 @@ static bool js_gfx_GFXInputAssemblerInfo_constructor(se::State& s) } else if(argc == 4) { - cocos2d::GFXInputAssemblerInfo* cobj = JSB_ALLOC(cocos2d::GFXInputAssemblerInfo); - std::vector arg0; + cc::GFXInputAssemblerInfo* cobj = JSB_ALLOC(cc::GFXInputAssemblerInfo); + std::vector arg0; if (!args[0].isUndefined()) { ok &= seval_to_std_vector(args[0], &arg0); cobj->attributes = arg0; } - std::vector arg1; + std::vector arg1; if (!args[1].isUndefined()) { ok &= seval_to_std_vector(args[1], &arg1); cobj->vertexBuffers = arg1; } - cocos2d::GFXBuffer* arg2 = nullptr; + cc::GFXBuffer* arg2 = nullptr; if (!args[2].isUndefined()) { ok &= seval_to_native_ptr(args[2], &arg2); cobj->indexBuffer = arg2; } - cocos2d::GFXBuffer* arg3 = nullptr; + cc::GFXBuffer* arg3 = nullptr; if (!args[3].isUndefined()) { ok &= seval_to_native_ptr(args[3], &arg3); cobj->indirectBuffer = arg3; @@ -6717,24 +6717,24 @@ static bool js_gfx_GFXInputAssemblerInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXInputAssemblerInfo_constructor, __jsb_cocos2d_GFXInputAssemblerInfo_class, js_cocos2d_GFXInputAssemblerInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXInputAssemblerInfo_constructor, __jsb_cc_GFXInputAssemblerInfo_class, js_cc_GFXInputAssemblerInfo_finalize) -static bool js_cocos2d_GFXInputAssemblerInfo_finalize(se::State& s) +static bool js_cc_GFXInputAssemblerInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXInputAssemblerInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXInputAssemblerInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXInputAssemblerInfo* cobj = (cocos2d::GFXInputAssemblerInfo*)s.nativeThisObject(); + cc::GFXInputAssemblerInfo* cobj = (cc::GFXInputAssemblerInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXInputAssemblerInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXInputAssemblerInfo_finalize) bool js_register_gfx_GFXInputAssemblerInfo(se::Object* obj) { @@ -6744,23 +6744,23 @@ bool js_register_gfx_GFXInputAssemblerInfo(se::Object* obj) cls->defineProperty("vertexBuffers", _SE(js_gfx_GFXInputAssemblerInfo_get_vertexBuffers), _SE(js_gfx_GFXInputAssemblerInfo_set_vertexBuffers)); cls->defineProperty("indexBuffer", _SE(js_gfx_GFXInputAssemblerInfo_get_indexBuffer), _SE(js_gfx_GFXInputAssemblerInfo_set_indexBuffer)); cls->defineProperty("indirectBuffer", _SE(js_gfx_GFXInputAssemblerInfo_get_indirectBuffer), _SE(js_gfx_GFXInputAssemblerInfo_set_indirectBuffer)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXInputAssemblerInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXInputAssemblerInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXInputAssemblerInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXInputAssemblerInfo_class = cls; + __jsb_cc_GFXInputAssemblerInfo_proto = cls->getProto(); + __jsb_cc_GFXInputAssemblerInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXColorAttachment_proto = nullptr; -se::Class* __jsb_cocos2d_GFXColorAttachment_class = nullptr; +se::Object* __jsb_cc_GFXColorAttachment_proto = nullptr; +se::Class* __jsb_cc_GFXColorAttachment_class = nullptr; static bool js_gfx_GFXColorAttachment_get_format(se::State& s) { - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_get_format : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6774,12 +6774,12 @@ SE_BIND_PROP_GET(js_gfx_GFXColorAttachment_get_format) static bool js_gfx_GFXColorAttachment_set_format(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_set_format : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFormat arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + cc::GFXFormat arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXColorAttachment_set_format : Error processing new value"); cobj->format = arg0; return true; @@ -6788,7 +6788,7 @@ SE_BIND_PROP_SET(js_gfx_GFXColorAttachment_set_format) static bool js_gfx_GFXColorAttachment_get_loadOp(se::State& s) { - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_get_loadOp : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6802,12 +6802,12 @@ SE_BIND_PROP_GET(js_gfx_GFXColorAttachment_get_loadOp) static bool js_gfx_GFXColorAttachment_set_loadOp(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_set_loadOp : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXLoadOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXLoadOp)tmp; } while(false); + cc::GFXLoadOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXLoadOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXColorAttachment_set_loadOp : Error processing new value"); cobj->loadOp = arg0; return true; @@ -6816,7 +6816,7 @@ SE_BIND_PROP_SET(js_gfx_GFXColorAttachment_set_loadOp) static bool js_gfx_GFXColorAttachment_get_storeOp(se::State& s) { - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_get_storeOp : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6830,12 +6830,12 @@ SE_BIND_PROP_GET(js_gfx_GFXColorAttachment_get_storeOp) static bool js_gfx_GFXColorAttachment_set_storeOp(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_set_storeOp : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStoreOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStoreOp)tmp; } while(false); + cc::GFXStoreOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStoreOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXColorAttachment_set_storeOp : Error processing new value"); cobj->storeOp = arg0; return true; @@ -6844,7 +6844,7 @@ SE_BIND_PROP_SET(js_gfx_GFXColorAttachment_set_storeOp) static bool js_gfx_GFXColorAttachment_get_sampleCount(se::State& s) { - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_get_sampleCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6858,7 +6858,7 @@ SE_BIND_PROP_GET(js_gfx_GFXColorAttachment_get_sampleCount) static bool js_gfx_GFXColorAttachment_set_sampleCount(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_set_sampleCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6872,7 +6872,7 @@ SE_BIND_PROP_SET(js_gfx_GFXColorAttachment_set_sampleCount) static bool js_gfx_GFXColorAttachment_get_beginLayout(se::State& s) { - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_get_beginLayout : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6886,12 +6886,12 @@ SE_BIND_PROP_GET(js_gfx_GFXColorAttachment_get_beginLayout) static bool js_gfx_GFXColorAttachment_set_beginLayout(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_set_beginLayout : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureLayout arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureLayout)tmp; } while(false); + cc::GFXTextureLayout arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureLayout)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXColorAttachment_set_beginLayout : Error processing new value"); cobj->beginLayout = arg0; return true; @@ -6900,7 +6900,7 @@ SE_BIND_PROP_SET(js_gfx_GFXColorAttachment_set_beginLayout) static bool js_gfx_GFXColorAttachment_get_endLayout(se::State& s) { - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_get_endLayout : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -6914,19 +6914,19 @@ SE_BIND_PROP_GET(js_gfx_GFXColorAttachment_get_endLayout) static bool js_gfx_GFXColorAttachment_set_endLayout(se::State& s) { const auto& args = s.args(); - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXColorAttachment_set_endLayout : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureLayout arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureLayout)tmp; } while(false); + cc::GFXTextureLayout arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureLayout)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXColorAttachment_set_endLayout : Error processing new value"); cobj->endLayout = arg0; return true; } SE_BIND_PROP_SET(js_gfx_GFXColorAttachment_set_endLayout) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXColorAttachment_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXColorAttachment_finalize) static bool js_gfx_GFXColorAttachment_constructor(se::State& s) { @@ -6936,7 +6936,7 @@ static bool js_gfx_GFXColorAttachment_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXColorAttachment* cobj = JSB_ALLOC(cocos2d::GFXColorAttachment); + cc::GFXColorAttachment* cobj = JSB_ALLOC(cc::GFXColorAttachment); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -6946,23 +6946,23 @@ static bool js_gfx_GFXColorAttachment_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXColorAttachment* cobj = JSB_ALLOC(cocos2d::GFXColorAttachment); - cocos2d::GFXFormat arg0; + cc::GFXColorAttachment* cobj = JSB_ALLOC(cc::GFXColorAttachment); + cc::GFXFormat arg0; json->getProperty("format", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg0; } - cocos2d::GFXLoadOp arg1; + cc::GFXLoadOp arg1; json->getProperty("loadOp", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXLoadOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXLoadOp)tmp; } while(false); cobj->loadOp = arg1; } - cocos2d::GFXStoreOp arg2; + cc::GFXStoreOp arg2; json->getProperty("storeOp", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXStoreOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXStoreOp)tmp; } while(false); cobj->storeOp = arg2; } unsigned int arg3 = 0; @@ -6971,16 +6971,16 @@ static bool js_gfx_GFXColorAttachment_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg3); cobj->sampleCount = arg3; } - cocos2d::GFXTextureLayout arg4; + cc::GFXTextureLayout arg4; json->getProperty("beginLayout", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cc::GFXTextureLayout)tmp; } while(false); cobj->beginLayout = arg4; } - cocos2d::GFXTextureLayout arg5; + cc::GFXTextureLayout arg5; json->getProperty("endLayout", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg5 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg5 = (cc::GFXTextureLayout)tmp; } while(false); cobj->endLayout = arg5; } @@ -6996,20 +6996,20 @@ static bool js_gfx_GFXColorAttachment_constructor(se::State& s) } else if(argc == 6) { - cocos2d::GFXColorAttachment* cobj = JSB_ALLOC(cocos2d::GFXColorAttachment); - cocos2d::GFXFormat arg0; + cc::GFXColorAttachment* cobj = JSB_ALLOC(cc::GFXColorAttachment); + cc::GFXFormat arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg0; } - cocos2d::GFXLoadOp arg1; + cc::GFXLoadOp arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXLoadOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXLoadOp)tmp; } while(false); cobj->loadOp = arg1; } - cocos2d::GFXStoreOp arg2; + cc::GFXStoreOp arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXStoreOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXStoreOp)tmp; } while(false); cobj->storeOp = arg2; } unsigned int arg3 = 0; @@ -7017,14 +7017,14 @@ static bool js_gfx_GFXColorAttachment_constructor(se::State& s) ok &= seval_to_uint32(args[3], (uint32_t*)&arg3); cobj->sampleCount = arg3; } - cocos2d::GFXTextureLayout arg4; + cc::GFXTextureLayout arg4; if (!args[4].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cc::GFXTextureLayout)tmp; } while(false); cobj->beginLayout = arg4; } - cocos2d::GFXTextureLayout arg5; + cc::GFXTextureLayout arg5; if (!args[5].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[5], &tmp); arg5 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[5], &tmp); arg5 = (cc::GFXTextureLayout)tmp; } while(false); cobj->endLayout = arg5; } @@ -7042,24 +7042,24 @@ static bool js_gfx_GFXColorAttachment_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXColorAttachment_constructor, __jsb_cocos2d_GFXColorAttachment_class, js_cocos2d_GFXColorAttachment_finalize) +SE_BIND_CTOR(js_gfx_GFXColorAttachment_constructor, __jsb_cc_GFXColorAttachment_class, js_cc_GFXColorAttachment_finalize) -static bool js_cocos2d_GFXColorAttachment_finalize(se::State& s) +static bool js_cc_GFXColorAttachment_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXColorAttachment)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXColorAttachment)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXColorAttachment* cobj = (cocos2d::GFXColorAttachment*)s.nativeThisObject(); + cc::GFXColorAttachment* cobj = (cc::GFXColorAttachment*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXColorAttachment_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXColorAttachment_finalize) bool js_register_gfx_GFXColorAttachment(se::Object* obj) { @@ -7071,23 +7071,23 @@ bool js_register_gfx_GFXColorAttachment(se::Object* obj) cls->defineProperty("sampleCount", _SE(js_gfx_GFXColorAttachment_get_sampleCount), _SE(js_gfx_GFXColorAttachment_set_sampleCount)); cls->defineProperty("beginLayout", _SE(js_gfx_GFXColorAttachment_get_beginLayout), _SE(js_gfx_GFXColorAttachment_set_beginLayout)); cls->defineProperty("endLayout", _SE(js_gfx_GFXColorAttachment_get_endLayout), _SE(js_gfx_GFXColorAttachment_set_endLayout)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXColorAttachment_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXColorAttachment_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXColorAttachment_proto = cls->getProto(); - __jsb_cocos2d_GFXColorAttachment_class = cls; + __jsb_cc_GFXColorAttachment_proto = cls->getProto(); + __jsb_cc_GFXColorAttachment_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXDepthStencilAttachment_proto = nullptr; -se::Class* __jsb_cocos2d_GFXDepthStencilAttachment_class = nullptr; +se::Object* __jsb_cc_GFXDepthStencilAttachment_proto = nullptr; +se::Class* __jsb_cc_GFXDepthStencilAttachment_class = nullptr; static bool js_gfx_GFXDepthStencilAttachment_get_format(se::State& s) { - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_get_format : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7101,12 +7101,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilAttachment_get_format) static bool js_gfx_GFXDepthStencilAttachment_set_format(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_set_format : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFormat arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + cc::GFXFormat arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilAttachment_set_format : Error processing new value"); cobj->format = arg0; return true; @@ -7115,7 +7115,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilAttachment_set_format) static bool js_gfx_GFXDepthStencilAttachment_get_depthLoadOp(se::State& s) { - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_get_depthLoadOp : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7129,12 +7129,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilAttachment_get_depthLoadOp) static bool js_gfx_GFXDepthStencilAttachment_set_depthLoadOp(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_set_depthLoadOp : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXLoadOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXLoadOp)tmp; } while(false); + cc::GFXLoadOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXLoadOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilAttachment_set_depthLoadOp : Error processing new value"); cobj->depthLoadOp = arg0; return true; @@ -7143,7 +7143,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilAttachment_set_depthLoadOp) static bool js_gfx_GFXDepthStencilAttachment_get_depthStoreOp(se::State& s) { - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_get_depthStoreOp : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7157,12 +7157,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilAttachment_get_depthStoreOp) static bool js_gfx_GFXDepthStencilAttachment_set_depthStoreOp(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_set_depthStoreOp : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStoreOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStoreOp)tmp; } while(false); + cc::GFXStoreOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStoreOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilAttachment_set_depthStoreOp : Error processing new value"); cobj->depthStoreOp = arg0; return true; @@ -7171,7 +7171,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilAttachment_set_depthStoreOp) static bool js_gfx_GFXDepthStencilAttachment_get_stencilLoadOp(se::State& s) { - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_get_stencilLoadOp : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7185,12 +7185,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilAttachment_get_stencilLoadOp) static bool js_gfx_GFXDepthStencilAttachment_set_stencilLoadOp(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_set_stencilLoadOp : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXLoadOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXLoadOp)tmp; } while(false); + cc::GFXLoadOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXLoadOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilAttachment_set_stencilLoadOp : Error processing new value"); cobj->stencilLoadOp = arg0; return true; @@ -7199,7 +7199,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilAttachment_set_stencilLoadOp) static bool js_gfx_GFXDepthStencilAttachment_get_stencilStoreOp(se::State& s) { - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_get_stencilStoreOp : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7213,12 +7213,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilAttachment_get_stencilStoreOp) static bool js_gfx_GFXDepthStencilAttachment_set_stencilStoreOp(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_set_stencilStoreOp : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStoreOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStoreOp)tmp; } while(false); + cc::GFXStoreOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStoreOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilAttachment_set_stencilStoreOp : Error processing new value"); cobj->stencilStoreOp = arg0; return true; @@ -7227,7 +7227,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilAttachment_set_stencilStoreOp) static bool js_gfx_GFXDepthStencilAttachment_get_sampleCount(se::State& s) { - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_get_sampleCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7241,7 +7241,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilAttachment_get_sampleCount) static bool js_gfx_GFXDepthStencilAttachment_set_sampleCount(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_set_sampleCount : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7255,7 +7255,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilAttachment_set_sampleCount) static bool js_gfx_GFXDepthStencilAttachment_get_beginLayout(se::State& s) { - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_get_beginLayout : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7269,12 +7269,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilAttachment_get_beginLayout) static bool js_gfx_GFXDepthStencilAttachment_set_beginLayout(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_set_beginLayout : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureLayout arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureLayout)tmp; } while(false); + cc::GFXTextureLayout arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureLayout)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilAttachment_set_beginLayout : Error processing new value"); cobj->beginLayout = arg0; return true; @@ -7283,7 +7283,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilAttachment_set_beginLayout) static bool js_gfx_GFXDepthStencilAttachment_get_endLayout(se::State& s) { - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_get_endLayout : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7297,19 +7297,19 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilAttachment_get_endLayout) static bool js_gfx_GFXDepthStencilAttachment_set_endLayout(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilAttachment_set_endLayout : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTextureLayout arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXTextureLayout)tmp; } while(false); + cc::GFXTextureLayout arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXTextureLayout)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilAttachment_set_endLayout : Error processing new value"); cobj->endLayout = arg0; return true; } SE_BIND_PROP_SET(js_gfx_GFXDepthStencilAttachment_set_endLayout) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXDepthStencilAttachment_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXDepthStencilAttachment_finalize) static bool js_gfx_GFXDepthStencilAttachment_constructor(se::State& s) { @@ -7319,7 +7319,7 @@ static bool js_gfx_GFXDepthStencilAttachment_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXDepthStencilAttachment* cobj = JSB_ALLOC(cocos2d::GFXDepthStencilAttachment); + cc::GFXDepthStencilAttachment* cobj = JSB_ALLOC(cc::GFXDepthStencilAttachment); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -7329,35 +7329,35 @@ static bool js_gfx_GFXDepthStencilAttachment_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXDepthStencilAttachment* cobj = JSB_ALLOC(cocos2d::GFXDepthStencilAttachment); - cocos2d::GFXFormat arg0; + cc::GFXDepthStencilAttachment* cobj = JSB_ALLOC(cc::GFXDepthStencilAttachment); + cc::GFXFormat arg0; json->getProperty("format", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg0; } - cocos2d::GFXLoadOp arg1; + cc::GFXLoadOp arg1; json->getProperty("depthLoadOp", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXLoadOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXLoadOp)tmp; } while(false); cobj->depthLoadOp = arg1; } - cocos2d::GFXStoreOp arg2; + cc::GFXStoreOp arg2; json->getProperty("depthStoreOp", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXStoreOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXStoreOp)tmp; } while(false); cobj->depthStoreOp = arg2; } - cocos2d::GFXLoadOp arg3; + cc::GFXLoadOp arg3; json->getProperty("stencilLoadOp", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cocos2d::GFXLoadOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cc::GFXLoadOp)tmp; } while(false); cobj->stencilLoadOp = arg3; } - cocos2d::GFXStoreOp arg4; + cc::GFXStoreOp arg4; json->getProperty("stencilStoreOp", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cocos2d::GFXStoreOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cc::GFXStoreOp)tmp; } while(false); cobj->stencilStoreOp = arg4; } unsigned int arg5 = 0; @@ -7366,16 +7366,16 @@ static bool js_gfx_GFXDepthStencilAttachment_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg5); cobj->sampleCount = arg5; } - cocos2d::GFXTextureLayout arg6; + cc::GFXTextureLayout arg6; json->getProperty("beginLayout", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg6 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg6 = (cc::GFXTextureLayout)tmp; } while(false); cobj->beginLayout = arg6; } - cocos2d::GFXTextureLayout arg7; + cc::GFXTextureLayout arg7; json->getProperty("endLayout", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg7 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg7 = (cc::GFXTextureLayout)tmp; } while(false); cobj->endLayout = arg7; } @@ -7391,30 +7391,30 @@ static bool js_gfx_GFXDepthStencilAttachment_constructor(se::State& s) } else if(argc == 8) { - cocos2d::GFXDepthStencilAttachment* cobj = JSB_ALLOC(cocos2d::GFXDepthStencilAttachment); - cocos2d::GFXFormat arg0; + cc::GFXDepthStencilAttachment* cobj = JSB_ALLOC(cc::GFXDepthStencilAttachment); + cc::GFXFormat arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFormat)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFormat)tmp; } while(false); cobj->format = arg0; } - cocos2d::GFXLoadOp arg1; + cc::GFXLoadOp arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXLoadOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXLoadOp)tmp; } while(false); cobj->depthLoadOp = arg1; } - cocos2d::GFXStoreOp arg2; + cc::GFXStoreOp arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXStoreOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXStoreOp)tmp; } while(false); cobj->depthStoreOp = arg2; } - cocos2d::GFXLoadOp arg3; + cc::GFXLoadOp arg3; if (!args[3].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cocos2d::GFXLoadOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cc::GFXLoadOp)tmp; } while(false); cobj->stencilLoadOp = arg3; } - cocos2d::GFXStoreOp arg4; + cc::GFXStoreOp arg4; if (!args[4].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cocos2d::GFXStoreOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cc::GFXStoreOp)tmp; } while(false); cobj->stencilStoreOp = arg4; } unsigned int arg5 = 0; @@ -7422,14 +7422,14 @@ static bool js_gfx_GFXDepthStencilAttachment_constructor(se::State& s) ok &= seval_to_uint32(args[5], (uint32_t*)&arg5); cobj->sampleCount = arg5; } - cocos2d::GFXTextureLayout arg6; + cc::GFXTextureLayout arg6; if (!args[6].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[6], &tmp); arg6 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[6], &tmp); arg6 = (cc::GFXTextureLayout)tmp; } while(false); cobj->beginLayout = arg6; } - cocos2d::GFXTextureLayout arg7; + cc::GFXTextureLayout arg7; if (!args[7].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[7], &tmp); arg7 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[7], &tmp); arg7 = (cc::GFXTextureLayout)tmp; } while(false); cobj->endLayout = arg7; } @@ -7447,24 +7447,24 @@ static bool js_gfx_GFXDepthStencilAttachment_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXDepthStencilAttachment_constructor, __jsb_cocos2d_GFXDepthStencilAttachment_class, js_cocos2d_GFXDepthStencilAttachment_finalize) +SE_BIND_CTOR(js_gfx_GFXDepthStencilAttachment_constructor, __jsb_cc_GFXDepthStencilAttachment_class, js_cc_GFXDepthStencilAttachment_finalize) -static bool js_cocos2d_GFXDepthStencilAttachment_finalize(se::State& s) +static bool js_cc_GFXDepthStencilAttachment_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXDepthStencilAttachment)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXDepthStencilAttachment)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXDepthStencilAttachment* cobj = (cocos2d::GFXDepthStencilAttachment*)s.nativeThisObject(); + cc::GFXDepthStencilAttachment* cobj = (cc::GFXDepthStencilAttachment*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXDepthStencilAttachment_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXDepthStencilAttachment_finalize) bool js_register_gfx_GFXDepthStencilAttachment(se::Object* obj) { @@ -7478,23 +7478,23 @@ bool js_register_gfx_GFXDepthStencilAttachment(se::Object* obj) cls->defineProperty("sampleCount", _SE(js_gfx_GFXDepthStencilAttachment_get_sampleCount), _SE(js_gfx_GFXDepthStencilAttachment_set_sampleCount)); cls->defineProperty("beginLayout", _SE(js_gfx_GFXDepthStencilAttachment_get_beginLayout), _SE(js_gfx_GFXDepthStencilAttachment_set_beginLayout)); cls->defineProperty("endLayout", _SE(js_gfx_GFXDepthStencilAttachment_get_endLayout), _SE(js_gfx_GFXDepthStencilAttachment_set_endLayout)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXDepthStencilAttachment_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXDepthStencilAttachment_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXDepthStencilAttachment_proto = cls->getProto(); - __jsb_cocos2d_GFXDepthStencilAttachment_class = cls; + __jsb_cc_GFXDepthStencilAttachment_proto = cls->getProto(); + __jsb_cc_GFXDepthStencilAttachment_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXRenderPassInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXRenderPassInfo_class = nullptr; +se::Object* __jsb_cc_GFXRenderPassInfo_proto = nullptr; +se::Class* __jsb_cc_GFXRenderPassInfo_class = nullptr; static bool js_gfx_GFXRenderPassInfo_get_colorAttachments(se::State& s) { - cocos2d::GFXRenderPassInfo* cobj = (cocos2d::GFXRenderPassInfo*)s.nativeThisObject(); + cc::GFXRenderPassInfo* cobj = (cc::GFXRenderPassInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPassInfo_get_colorAttachments : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7508,11 +7508,11 @@ SE_BIND_PROP_GET(js_gfx_GFXRenderPassInfo_get_colorAttachments) static bool js_gfx_GFXRenderPassInfo_set_colorAttachments(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRenderPassInfo* cobj = (cocos2d::GFXRenderPassInfo*)s.nativeThisObject(); + cc::GFXRenderPassInfo* cobj = (cc::GFXRenderPassInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPassInfo_set_colorAttachments : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXRenderPassInfo_set_colorAttachments : Error processing new value"); cobj->colorAttachments = arg0; @@ -7522,7 +7522,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRenderPassInfo_set_colorAttachments) static bool js_gfx_GFXRenderPassInfo_get_depthStencilAttachment(se::State& s) { - cocos2d::GFXRenderPassInfo* cobj = (cocos2d::GFXRenderPassInfo*)s.nativeThisObject(); + cc::GFXRenderPassInfo* cobj = (cc::GFXRenderPassInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPassInfo_get_depthStencilAttachment : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7536,11 +7536,11 @@ SE_BIND_PROP_GET(js_gfx_GFXRenderPassInfo_get_depthStencilAttachment) static bool js_gfx_GFXRenderPassInfo_set_depthStencilAttachment(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRenderPassInfo* cobj = (cocos2d::GFXRenderPassInfo*)s.nativeThisObject(); + cc::GFXRenderPassInfo* cobj = (cc::GFXRenderPassInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPassInfo_set_depthStencilAttachment : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXDepthStencilAttachment* arg0 = nullptr; + cc::GFXDepthStencilAttachment* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXRenderPassInfo_set_depthStencilAttachment : Error processing new value"); cobj->depthStencilAttachment = *arg0; @@ -7550,7 +7550,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRenderPassInfo_set_depthStencilAttachment) static bool js_gfx_GFXRenderPassInfo_get_subPasses(se::State& s) { - cocos2d::GFXRenderPassInfo* cobj = (cocos2d::GFXRenderPassInfo*)s.nativeThisObject(); + cc::GFXRenderPassInfo* cobj = (cc::GFXRenderPassInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPassInfo_get_subPasses : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7564,11 +7564,11 @@ SE_BIND_PROP_GET(js_gfx_GFXRenderPassInfo_get_subPasses) static bool js_gfx_GFXRenderPassInfo_set_subPasses(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRenderPassInfo* cobj = (cocos2d::GFXRenderPassInfo*)s.nativeThisObject(); + cc::GFXRenderPassInfo* cobj = (cc::GFXRenderPassInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPassInfo_set_subPasses : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXRenderPassInfo_set_subPasses : Error processing new value"); cobj->subPasses = arg0; @@ -7576,7 +7576,7 @@ static bool js_gfx_GFXRenderPassInfo_set_subPasses(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXRenderPassInfo_set_subPasses) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXRenderPassInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXRenderPassInfo_finalize) static bool js_gfx_GFXRenderPassInfo_constructor(se::State& s) { @@ -7586,7 +7586,7 @@ static bool js_gfx_GFXRenderPassInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXRenderPassInfo* cobj = JSB_ALLOC(cocos2d::GFXRenderPassInfo); + cc::GFXRenderPassInfo* cobj = JSB_ALLOC(cc::GFXRenderPassInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -7596,20 +7596,20 @@ static bool js_gfx_GFXRenderPassInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXRenderPassInfo* cobj = JSB_ALLOC(cocos2d::GFXRenderPassInfo); - std::vector arg0; + cc::GFXRenderPassInfo* cobj = JSB_ALLOC(cc::GFXRenderPassInfo); + std::vector arg0; json->getProperty("colorAttachments", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg0); cobj->colorAttachments = arg0; } - cocos2d::GFXDepthStencilAttachment* arg1 = nullptr; + cc::GFXDepthStencilAttachment* arg1 = nullptr; json->getProperty("depthStencilAttachment", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg1); cobj->depthStencilAttachment = *arg1; } - std::vector arg2; + std::vector arg2; json->getProperty("subPasses", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg2); @@ -7628,18 +7628,18 @@ static bool js_gfx_GFXRenderPassInfo_constructor(se::State& s) } else if(argc == 3) { - cocos2d::GFXRenderPassInfo* cobj = JSB_ALLOC(cocos2d::GFXRenderPassInfo); - std::vector arg0; + cc::GFXRenderPassInfo* cobj = JSB_ALLOC(cc::GFXRenderPassInfo); + std::vector arg0; if (!args[0].isUndefined()) { ok &= seval_to_std_vector(args[0], &arg0); cobj->colorAttachments = arg0; } - cocos2d::GFXDepthStencilAttachment* arg1 = nullptr; + cc::GFXDepthStencilAttachment* arg1 = nullptr; if (!args[1].isUndefined()) { ok &= seval_to_reference(args[1], &arg1); cobj->depthStencilAttachment = *arg1; } - std::vector arg2; + std::vector arg2; if (!args[2].isUndefined()) { ok &= seval_to_std_vector(args[2], &arg2); cobj->subPasses = arg2; @@ -7659,24 +7659,24 @@ static bool js_gfx_GFXRenderPassInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXRenderPassInfo_constructor, __jsb_cocos2d_GFXRenderPassInfo_class, js_cocos2d_GFXRenderPassInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXRenderPassInfo_constructor, __jsb_cc_GFXRenderPassInfo_class, js_cc_GFXRenderPassInfo_finalize) -static bool js_cocos2d_GFXRenderPassInfo_finalize(se::State& s) +static bool js_cc_GFXRenderPassInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXRenderPassInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXRenderPassInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXRenderPassInfo* cobj = (cocos2d::GFXRenderPassInfo*)s.nativeThisObject(); + cc::GFXRenderPassInfo* cobj = (cc::GFXRenderPassInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXRenderPassInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXRenderPassInfo_finalize) bool js_register_gfx_GFXRenderPassInfo(se::Object* obj) { @@ -7685,23 +7685,23 @@ bool js_register_gfx_GFXRenderPassInfo(se::Object* obj) cls->defineProperty("colorAttachments", _SE(js_gfx_GFXRenderPassInfo_get_colorAttachments), _SE(js_gfx_GFXRenderPassInfo_set_colorAttachments)); cls->defineProperty("depthStencilAttachment", _SE(js_gfx_GFXRenderPassInfo_get_depthStencilAttachment), _SE(js_gfx_GFXRenderPassInfo_set_depthStencilAttachment)); cls->defineProperty("subPasses", _SE(js_gfx_GFXRenderPassInfo_get_subPasses), _SE(js_gfx_GFXRenderPassInfo_set_subPasses)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXRenderPassInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXRenderPassInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXRenderPassInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXRenderPassInfo_class = cls; + __jsb_cc_GFXRenderPassInfo_proto = cls->getProto(); + __jsb_cc_GFXRenderPassInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXFramebufferInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXFramebufferInfo_class = nullptr; +se::Object* __jsb_cc_GFXFramebufferInfo_proto = nullptr; +se::Class* __jsb_cc_GFXFramebufferInfo_class = nullptr; static bool js_gfx_GFXFramebufferInfo_get_renderPass(se::State& s) { - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_get_renderPass : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7715,11 +7715,11 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebufferInfo_get_renderPass) static bool js_gfx_GFXFramebufferInfo_set_renderPass(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_set_renderPass : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXRenderPass* arg0 = nullptr; + cc::GFXRenderPass* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXFramebufferInfo_set_renderPass : Error processing new value"); cobj->renderPass = arg0; @@ -7729,7 +7729,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFramebufferInfo_set_renderPass) static bool js_gfx_GFXFramebufferInfo_get_colorTextures(se::State& s) { - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_get_colorTextures : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7743,11 +7743,11 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebufferInfo_get_colorTextures) static bool js_gfx_GFXFramebufferInfo_set_colorTextures(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_set_colorTextures : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXFramebufferInfo_set_colorTextures : Error processing new value"); cobj->colorTextures = arg0; @@ -7757,7 +7757,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFramebufferInfo_set_colorTextures) static bool js_gfx_GFXFramebufferInfo_get_colorMipmapLevels(se::State& s) { - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_get_colorMipmapLevels : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7771,7 +7771,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebufferInfo_get_colorMipmapLevels) static bool js_gfx_GFXFramebufferInfo_set_colorMipmapLevels(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_set_colorMipmapLevels : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7785,7 +7785,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFramebufferInfo_set_colorMipmapLevels) static bool js_gfx_GFXFramebufferInfo_get_depthStencilTexture(se::State& s) { - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_get_depthStencilTexture : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7799,11 +7799,11 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebufferInfo_get_depthStencilTexture) static bool js_gfx_GFXFramebufferInfo_set_depthStencilTexture(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_set_depthStencilTexture : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTexture* arg0 = nullptr; + cc::GFXTexture* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXFramebufferInfo_set_depthStencilTexture : Error processing new value"); cobj->depthStencilTexture = arg0; @@ -7813,7 +7813,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFramebufferInfo_set_depthStencilTexture) static bool js_gfx_GFXFramebufferInfo_get_depthStencilMipmapLevel(se::State& s) { - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_get_depthStencilMipmapLevel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7827,7 +7827,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebufferInfo_get_depthStencilMipmapLevel) static bool js_gfx_GFXFramebufferInfo_set_depthStencilMipmapLevel(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_set_depthStencilMipmapLevel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7841,7 +7841,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFramebufferInfo_set_depthStencilMipmapLevel) static bool js_gfx_GFXFramebufferInfo_get_isOffscreen(se::State& s) { - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_get_isOffscreen : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7855,7 +7855,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebufferInfo_get_isOffscreen) static bool js_gfx_GFXFramebufferInfo_set_isOffscreen(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebufferInfo_set_isOffscreen : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -7867,7 +7867,7 @@ static bool js_gfx_GFXFramebufferInfo_set_isOffscreen(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXFramebufferInfo_set_isOffscreen) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXFramebufferInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXFramebufferInfo_finalize) static bool js_gfx_GFXFramebufferInfo_constructor(se::State& s) { @@ -7877,7 +7877,7 @@ static bool js_gfx_GFXFramebufferInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXFramebufferInfo* cobj = JSB_ALLOC(cocos2d::GFXFramebufferInfo); + cc::GFXFramebufferInfo* cobj = JSB_ALLOC(cc::GFXFramebufferInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -7887,14 +7887,14 @@ static bool js_gfx_GFXFramebufferInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXFramebufferInfo* cobj = JSB_ALLOC(cocos2d::GFXFramebufferInfo); - cocos2d::GFXRenderPass* arg0 = nullptr; + cc::GFXFramebufferInfo* cobj = JSB_ALLOC(cc::GFXFramebufferInfo); + cc::GFXRenderPass* arg0 = nullptr; json->getProperty("renderPass", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg0); cobj->renderPass = arg0; } - std::vector arg1; + std::vector arg1; json->getProperty("colorTextures", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg1); @@ -7906,7 +7906,7 @@ static bool js_gfx_GFXFramebufferInfo_constructor(se::State& s) ok &= seval_to_std_vector(field, &arg2); cobj->colorMipmapLevels = arg2; } - cocos2d::GFXTexture* arg3 = nullptr; + cc::GFXTexture* arg3 = nullptr; json->getProperty("depthStencilTexture", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg3); @@ -7937,13 +7937,13 @@ static bool js_gfx_GFXFramebufferInfo_constructor(se::State& s) } else if(argc == 6) { - cocos2d::GFXFramebufferInfo* cobj = JSB_ALLOC(cocos2d::GFXFramebufferInfo); - cocos2d::GFXRenderPass* arg0 = nullptr; + cc::GFXFramebufferInfo* cobj = JSB_ALLOC(cc::GFXFramebufferInfo); + cc::GFXRenderPass* arg0 = nullptr; if (!args[0].isUndefined()) { ok &= seval_to_native_ptr(args[0], &arg0); cobj->renderPass = arg0; } - std::vector arg1; + std::vector arg1; if (!args[1].isUndefined()) { ok &= seval_to_std_vector(args[1], &arg1); cobj->colorTextures = arg1; @@ -7953,7 +7953,7 @@ static bool js_gfx_GFXFramebufferInfo_constructor(se::State& s) ok &= seval_to_std_vector(args[2], &arg2); cobj->colorMipmapLevels = arg2; } - cocos2d::GFXTexture* arg3 = nullptr; + cc::GFXTexture* arg3 = nullptr; if (!args[3].isUndefined()) { ok &= seval_to_native_ptr(args[3], &arg3); cobj->depthStencilTexture = arg3; @@ -7983,24 +7983,24 @@ static bool js_gfx_GFXFramebufferInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXFramebufferInfo_constructor, __jsb_cocos2d_GFXFramebufferInfo_class, js_cocos2d_GFXFramebufferInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXFramebufferInfo_constructor, __jsb_cc_GFXFramebufferInfo_class, js_cc_GFXFramebufferInfo_finalize) -static bool js_cocos2d_GFXFramebufferInfo_finalize(se::State& s) +static bool js_cc_GFXFramebufferInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXFramebufferInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXFramebufferInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXFramebufferInfo* cobj = (cocos2d::GFXFramebufferInfo*)s.nativeThisObject(); + cc::GFXFramebufferInfo* cobj = (cc::GFXFramebufferInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXFramebufferInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXFramebufferInfo_finalize) bool js_register_gfx_GFXFramebufferInfo(se::Object* obj) { @@ -8012,23 +8012,23 @@ bool js_register_gfx_GFXFramebufferInfo(se::Object* obj) cls->defineProperty("depthStencilTexture", _SE(js_gfx_GFXFramebufferInfo_get_depthStencilTexture), _SE(js_gfx_GFXFramebufferInfo_set_depthStencilTexture)); cls->defineProperty("depthStencilMipmapLevel", _SE(js_gfx_GFXFramebufferInfo_get_depthStencilMipmapLevel), _SE(js_gfx_GFXFramebufferInfo_set_depthStencilMipmapLevel)); cls->defineProperty("isOffscreen", _SE(js_gfx_GFXFramebufferInfo_get_isOffscreen), _SE(js_gfx_GFXFramebufferInfo_set_isOffscreen)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXFramebufferInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXFramebufferInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXFramebufferInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXFramebufferInfo_class = cls; + __jsb_cc_GFXFramebufferInfo_proto = cls->getProto(); + __jsb_cc_GFXFramebufferInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBinding_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBinding_class = nullptr; +se::Object* __jsb_cc_GFXBinding_proto = nullptr; +se::Class* __jsb_cc_GFXBinding_class = nullptr; static bool js_gfx_GFXBinding_get_shaderStages(se::State& s) { - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_get_shaderStages : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8042,12 +8042,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBinding_get_shaderStages) static bool js_gfx_GFXBinding_set_shaderStages(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_set_shaderStages : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXShaderType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + cc::GFXShaderType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBinding_set_shaderStages : Error processing new value"); cobj->shaderStages = arg0; return true; @@ -8056,7 +8056,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBinding_set_shaderStages) static bool js_gfx_GFXBinding_get_binding(se::State& s) { - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_get_binding : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8070,7 +8070,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBinding_get_binding) static bool js_gfx_GFXBinding_set_binding(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_set_binding : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8084,7 +8084,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBinding_set_binding) static bool js_gfx_GFXBinding_get_type(se::State& s) { - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8098,12 +8098,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBinding_get_type) static bool js_gfx_GFXBinding_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBindingType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBindingType)tmp; } while(false); + cc::GFXBindingType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBindingType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBinding_set_type : Error processing new value"); cobj->type = arg0; return true; @@ -8112,7 +8112,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBinding_set_type) static bool js_gfx_GFXBinding_get_name(se::State& s) { - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8126,11 +8126,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBinding_get_name) static bool js_gfx_GFXBinding_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXBinding_set_name : Error processing new value"); cobj->name = arg0; @@ -8140,7 +8140,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBinding_set_name) static bool js_gfx_GFXBinding_get_count(se::State& s) { - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_get_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8154,7 +8154,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBinding_get_count) static bool js_gfx_GFXBinding_set_count(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBinding_set_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8166,7 +8166,7 @@ static bool js_gfx_GFXBinding_set_count(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXBinding_set_count) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBinding_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBinding_finalize) static bool js_gfx_GFXBinding_constructor(se::State& s) { @@ -8176,7 +8176,7 @@ static bool js_gfx_GFXBinding_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXBinding* cobj = JSB_ALLOC(cocos2d::GFXBinding); + cc::GFXBinding* cobj = JSB_ALLOC(cc::GFXBinding); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -8186,11 +8186,11 @@ static bool js_gfx_GFXBinding_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXBinding* cobj = JSB_ALLOC(cocos2d::GFXBinding); - cocos2d::GFXShaderType arg0; + cc::GFXBinding* cobj = JSB_ALLOC(cc::GFXBinding); + cc::GFXShaderType arg0; json->getProperty("shaderStages", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderStages = arg0; } unsigned int arg1 = 0; @@ -8199,13 +8199,13 @@ static bool js_gfx_GFXBinding_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg1); cobj->binding = arg1; } - cocos2d::GFXBindingType arg2; + cc::GFXBindingType arg2; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXBindingType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXBindingType)tmp; } while(false); cobj->type = arg2; } - cocos2d::String arg3; + cc::String arg3; json->getProperty("name", &field); if(!field.isUndefined()) { arg3 = field.toStringForce().c_str(); @@ -8230,10 +8230,10 @@ static bool js_gfx_GFXBinding_constructor(se::State& s) } else if(argc == 5) { - cocos2d::GFXBinding* cobj = JSB_ALLOC(cocos2d::GFXBinding); - cocos2d::GFXShaderType arg0; + cc::GFXBinding* cobj = JSB_ALLOC(cc::GFXBinding); + cc::GFXShaderType arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderStages = arg0; } unsigned int arg1 = 0; @@ -8241,12 +8241,12 @@ static bool js_gfx_GFXBinding_constructor(se::State& s) ok &= seval_to_uint32(args[1], (uint32_t*)&arg1); cobj->binding = arg1; } - cocos2d::GFXBindingType arg2; + cc::GFXBindingType arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXBindingType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXBindingType)tmp; } while(false); cobj->type = arg2; } - cocos2d::String arg3; + cc::String arg3; if (!args[3].isUndefined()) { arg3 = args[3].toStringForce().c_str(); cobj->name = arg3; @@ -8271,24 +8271,24 @@ static bool js_gfx_GFXBinding_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXBinding_constructor, __jsb_cocos2d_GFXBinding_class, js_cocos2d_GFXBinding_finalize) +SE_BIND_CTOR(js_gfx_GFXBinding_constructor, __jsb_cc_GFXBinding_class, js_cc_GFXBinding_finalize) -static bool js_cocos2d_GFXBinding_finalize(se::State& s) +static bool js_cc_GFXBinding_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBinding)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBinding)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBinding* cobj = (cocos2d::GFXBinding*)s.nativeThisObject(); + cc::GFXBinding* cobj = (cc::GFXBinding*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBinding_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBinding_finalize) bool js_register_gfx_GFXBinding(se::Object* obj) { @@ -8299,23 +8299,23 @@ bool js_register_gfx_GFXBinding(se::Object* obj) cls->defineProperty("type", _SE(js_gfx_GFXBinding_get_type), _SE(js_gfx_GFXBinding_set_type)); cls->defineProperty("name", _SE(js_gfx_GFXBinding_get_name), _SE(js_gfx_GFXBinding_set_name)); cls->defineProperty("count", _SE(js_gfx_GFXBinding_get_count), _SE(js_gfx_GFXBinding_set_count)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBinding_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBinding_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBinding_proto = cls->getProto(); - __jsb_cocos2d_GFXBinding_class = cls; + __jsb_cc_GFXBinding_proto = cls->getProto(); + __jsb_cc_GFXBinding_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBindingLayoutInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBindingLayoutInfo_class = nullptr; +se::Object* __jsb_cc_GFXBindingLayoutInfo_proto = nullptr; +se::Class* __jsb_cc_GFXBindingLayoutInfo_class = nullptr; static bool js_gfx_GFXBindingLayoutInfo_get_bindings(se::State& s) { - cocos2d::GFXBindingLayoutInfo* cobj = (cocos2d::GFXBindingLayoutInfo*)s.nativeThisObject(); + cc::GFXBindingLayoutInfo* cobj = (cc::GFXBindingLayoutInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayoutInfo_get_bindings : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8329,11 +8329,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingLayoutInfo_get_bindings) static bool js_gfx_GFXBindingLayoutInfo_set_bindings(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingLayoutInfo* cobj = (cocos2d::GFXBindingLayoutInfo*)s.nativeThisObject(); + cc::GFXBindingLayoutInfo* cobj = (cc::GFXBindingLayoutInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayoutInfo_set_bindings : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingLayoutInfo_set_bindings : Error processing new value"); cobj->bindings = arg0; @@ -8341,7 +8341,7 @@ static bool js_gfx_GFXBindingLayoutInfo_set_bindings(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXBindingLayoutInfo_set_bindings) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBindingLayoutInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBindingLayoutInfo_finalize) static bool js_gfx_GFXBindingLayoutInfo_constructor(se::State& s) { @@ -8351,15 +8351,15 @@ static bool js_gfx_GFXBindingLayoutInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXBindingLayoutInfo* cobj = JSB_ALLOC(cocos2d::GFXBindingLayoutInfo); + cc::GFXBindingLayoutInfo* cobj = JSB_ALLOC(cc::GFXBindingLayoutInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } else if(argc == 1) { - cocos2d::GFXBindingLayoutInfo* cobj = JSB_ALLOC(cocos2d::GFXBindingLayoutInfo); - std::vector arg0; + cc::GFXBindingLayoutInfo* cobj = JSB_ALLOC(cc::GFXBindingLayoutInfo); + std::vector arg0; if (!args[0].isUndefined()) { ok &= seval_to_std_vector(args[0], &arg0); cobj->bindings = arg0; @@ -8379,47 +8379,47 @@ static bool js_gfx_GFXBindingLayoutInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXBindingLayoutInfo_constructor, __jsb_cocos2d_GFXBindingLayoutInfo_class, js_cocos2d_GFXBindingLayoutInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXBindingLayoutInfo_constructor, __jsb_cc_GFXBindingLayoutInfo_class, js_cc_GFXBindingLayoutInfo_finalize) -static bool js_cocos2d_GFXBindingLayoutInfo_finalize(se::State& s) +static bool js_cc_GFXBindingLayoutInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBindingLayoutInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBindingLayoutInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBindingLayoutInfo* cobj = (cocos2d::GFXBindingLayoutInfo*)s.nativeThisObject(); + cc::GFXBindingLayoutInfo* cobj = (cc::GFXBindingLayoutInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBindingLayoutInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBindingLayoutInfo_finalize) bool js_register_gfx_GFXBindingLayoutInfo(se::Object* obj) { auto cls = se::Class::create("GFXBindingLayoutInfo", obj, nullptr, _SE(js_gfx_GFXBindingLayoutInfo_constructor)); cls->defineProperty("bindings", _SE(js_gfx_GFXBindingLayoutInfo_get_bindings), _SE(js_gfx_GFXBindingLayoutInfo_set_bindings)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBindingLayoutInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBindingLayoutInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBindingLayoutInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXBindingLayoutInfo_class = cls; + __jsb_cc_GFXBindingLayoutInfo_proto = cls->getProto(); + __jsb_cc_GFXBindingLayoutInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBindingUnit_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBindingUnit_class = nullptr; +se::Object* __jsb_cc_GFXBindingUnit_proto = nullptr; +se::Class* __jsb_cc_GFXBindingUnit_class = nullptr; static bool js_gfx_GFXBindingUnit_get_shaderStages(se::State& s) { - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_get_shaderStages : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8433,12 +8433,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingUnit_get_shaderStages) static bool js_gfx_GFXBindingUnit_set_shaderStages(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_set_shaderStages : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXShaderType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + cc::GFXShaderType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingUnit_set_shaderStages : Error processing new value"); cobj->shaderStages = arg0; return true; @@ -8447,7 +8447,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBindingUnit_set_shaderStages) static bool js_gfx_GFXBindingUnit_get_binding(se::State& s) { - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_get_binding : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8461,7 +8461,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingUnit_get_binding) static bool js_gfx_GFXBindingUnit_set_binding(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_set_binding : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8475,7 +8475,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBindingUnit_set_binding) static bool js_gfx_GFXBindingUnit_get_type(se::State& s) { - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8489,12 +8489,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingUnit_get_type) static bool js_gfx_GFXBindingUnit_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBindingType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBindingType)tmp; } while(false); + cc::GFXBindingType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBindingType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingUnit_set_type : Error processing new value"); cobj->type = arg0; return true; @@ -8503,7 +8503,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBindingUnit_set_type) static bool js_gfx_GFXBindingUnit_get_name(se::State& s) { - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8517,11 +8517,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingUnit_get_name) static bool js_gfx_GFXBindingUnit_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingUnit_set_name : Error processing new value"); cobj->name = arg0; @@ -8531,7 +8531,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBindingUnit_set_name) static bool js_gfx_GFXBindingUnit_get_count(se::State& s) { - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_get_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8545,7 +8545,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingUnit_get_count) static bool js_gfx_GFXBindingUnit_set_count(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_set_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8559,7 +8559,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBindingUnit_set_count) static bool js_gfx_GFXBindingUnit_get_buffer(se::State& s) { - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_get_buffer : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8573,11 +8573,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingUnit_get_buffer) static bool js_gfx_GFXBindingUnit_set_buffer(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_set_buffer : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBuffer* arg0 = nullptr; + cc::GFXBuffer* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingUnit_set_buffer : Error processing new value"); cobj->buffer = arg0; @@ -8587,7 +8587,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBindingUnit_set_buffer) static bool js_gfx_GFXBindingUnit_get_texture(se::State& s) { - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_get_texture : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8601,11 +8601,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingUnit_get_texture) static bool js_gfx_GFXBindingUnit_set_texture(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_set_texture : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXTexture* arg0 = nullptr; + cc::GFXTexture* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingUnit_set_texture : Error processing new value"); cobj->texture = arg0; @@ -8615,7 +8615,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBindingUnit_set_texture) static bool js_gfx_GFXBindingUnit_get_sampler(se::State& s) { - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_get_sampler : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8629,11 +8629,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingUnit_get_sampler) static bool js_gfx_GFXBindingUnit_set_sampler(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingUnit_set_sampler : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXSampler* arg0 = nullptr; + cc::GFXSampler* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingUnit_set_sampler : Error processing new value"); cobj->sampler = arg0; @@ -8641,7 +8641,7 @@ static bool js_gfx_GFXBindingUnit_set_sampler(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXBindingUnit_set_sampler) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBindingUnit_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBindingUnit_finalize) static bool js_gfx_GFXBindingUnit_constructor(se::State& s) { @@ -8651,7 +8651,7 @@ static bool js_gfx_GFXBindingUnit_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXBindingUnit* cobj = JSB_ALLOC(cocos2d::GFXBindingUnit); + cc::GFXBindingUnit* cobj = JSB_ALLOC(cc::GFXBindingUnit); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -8661,11 +8661,11 @@ static bool js_gfx_GFXBindingUnit_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXBindingUnit* cobj = JSB_ALLOC(cocos2d::GFXBindingUnit); - cocos2d::GFXShaderType arg0; + cc::GFXBindingUnit* cobj = JSB_ALLOC(cc::GFXBindingUnit); + cc::GFXShaderType arg0; json->getProperty("shaderStages", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderStages = arg0; } unsigned int arg1 = 0; @@ -8674,13 +8674,13 @@ static bool js_gfx_GFXBindingUnit_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg1); cobj->binding = arg1; } - cocos2d::GFXBindingType arg2; + cc::GFXBindingType arg2; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXBindingType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXBindingType)tmp; } while(false); cobj->type = arg2; } - cocos2d::String arg3; + cc::String arg3; json->getProperty("name", &field); if(!field.isUndefined()) { arg3 = field.toStringForce().c_str(); @@ -8692,19 +8692,19 @@ static bool js_gfx_GFXBindingUnit_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg4); cobj->count = arg4; } - cocos2d::GFXBuffer* arg5 = nullptr; + cc::GFXBuffer* arg5 = nullptr; json->getProperty("buffer", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg5); cobj->buffer = arg5; } - cocos2d::GFXTexture* arg6 = nullptr; + cc::GFXTexture* arg6 = nullptr; json->getProperty("texture", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg6); cobj->texture = arg6; } - cocos2d::GFXSampler* arg7 = nullptr; + cc::GFXSampler* arg7 = nullptr; json->getProperty("sampler", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg7); @@ -8723,10 +8723,10 @@ static bool js_gfx_GFXBindingUnit_constructor(se::State& s) } else if(argc == 8) { - cocos2d::GFXBindingUnit* cobj = JSB_ALLOC(cocos2d::GFXBindingUnit); - cocos2d::GFXShaderType arg0; + cc::GFXBindingUnit* cobj = JSB_ALLOC(cc::GFXBindingUnit); + cc::GFXShaderType arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderStages = arg0; } unsigned int arg1 = 0; @@ -8734,12 +8734,12 @@ static bool js_gfx_GFXBindingUnit_constructor(se::State& s) ok &= seval_to_uint32(args[1], (uint32_t*)&arg1); cobj->binding = arg1; } - cocos2d::GFXBindingType arg2; + cc::GFXBindingType arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXBindingType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXBindingType)tmp; } while(false); cobj->type = arg2; } - cocos2d::String arg3; + cc::String arg3; if (!args[3].isUndefined()) { arg3 = args[3].toStringForce().c_str(); cobj->name = arg3; @@ -8749,17 +8749,17 @@ static bool js_gfx_GFXBindingUnit_constructor(se::State& s) ok &= seval_to_uint32(args[4], (uint32_t*)&arg4); cobj->count = arg4; } - cocos2d::GFXBuffer* arg5 = nullptr; + cc::GFXBuffer* arg5 = nullptr; if (!args[5].isUndefined()) { ok &= seval_to_native_ptr(args[5], &arg5); cobj->buffer = arg5; } - cocos2d::GFXTexture* arg6 = nullptr; + cc::GFXTexture* arg6 = nullptr; if (!args[6].isUndefined()) { ok &= seval_to_native_ptr(args[6], &arg6); cobj->texture = arg6; } - cocos2d::GFXSampler* arg7 = nullptr; + cc::GFXSampler* arg7 = nullptr; if (!args[7].isUndefined()) { ok &= seval_to_native_ptr(args[7], &arg7); cobj->sampler = arg7; @@ -8779,24 +8779,24 @@ static bool js_gfx_GFXBindingUnit_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXBindingUnit_constructor, __jsb_cocos2d_GFXBindingUnit_class, js_cocos2d_GFXBindingUnit_finalize) +SE_BIND_CTOR(js_gfx_GFXBindingUnit_constructor, __jsb_cc_GFXBindingUnit_class, js_cc_GFXBindingUnit_finalize) -static bool js_cocos2d_GFXBindingUnit_finalize(se::State& s) +static bool js_cc_GFXBindingUnit_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBindingUnit)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBindingUnit)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBindingUnit* cobj = (cocos2d::GFXBindingUnit*)s.nativeThisObject(); + cc::GFXBindingUnit* cobj = (cc::GFXBindingUnit*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBindingUnit_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBindingUnit_finalize) bool js_register_gfx_GFXBindingUnit(se::Object* obj) { @@ -8810,23 +8810,23 @@ bool js_register_gfx_GFXBindingUnit(se::Object* obj) cls->defineProperty("buffer", _SE(js_gfx_GFXBindingUnit_get_buffer), _SE(js_gfx_GFXBindingUnit_set_buffer)); cls->defineProperty("texture", _SE(js_gfx_GFXBindingUnit_get_texture), _SE(js_gfx_GFXBindingUnit_set_texture)); cls->defineProperty("sampler", _SE(js_gfx_GFXBindingUnit_get_sampler), _SE(js_gfx_GFXBindingUnit_set_sampler)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBindingUnit_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBindingUnit_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBindingUnit_proto = cls->getProto(); - __jsb_cocos2d_GFXBindingUnit_class = cls; + __jsb_cc_GFXBindingUnit_proto = cls->getProto(); + __jsb_cc_GFXBindingUnit_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXPushConstantRange_proto = nullptr; -se::Class* __jsb_cocos2d_GFXPushConstantRange_class = nullptr; +se::Object* __jsb_cc_GFXPushConstantRange_proto = nullptr; +se::Class* __jsb_cc_GFXPushConstantRange_class = nullptr; static bool js_gfx_GFXPushConstantRange_get_shaderType(se::State& s) { - cocos2d::GFXPushConstantRange* cobj = (cocos2d::GFXPushConstantRange*)s.nativeThisObject(); + cc::GFXPushConstantRange* cobj = (cc::GFXPushConstantRange*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPushConstantRange_get_shaderType : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8840,12 +8840,12 @@ SE_BIND_PROP_GET(js_gfx_GFXPushConstantRange_get_shaderType) static bool js_gfx_GFXPushConstantRange_set_shaderType(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPushConstantRange* cobj = (cocos2d::GFXPushConstantRange*)s.nativeThisObject(); + cc::GFXPushConstantRange* cobj = (cc::GFXPushConstantRange*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPushConstantRange_set_shaderType : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXShaderType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + cc::GFXShaderType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXPushConstantRange_set_shaderType : Error processing new value"); cobj->shaderType = arg0; return true; @@ -8854,7 +8854,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPushConstantRange_set_shaderType) static bool js_gfx_GFXPushConstantRange_get_offset(se::State& s) { - cocos2d::GFXPushConstantRange* cobj = (cocos2d::GFXPushConstantRange*)s.nativeThisObject(); + cc::GFXPushConstantRange* cobj = (cc::GFXPushConstantRange*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPushConstantRange_get_offset : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8868,7 +8868,7 @@ SE_BIND_PROP_GET(js_gfx_GFXPushConstantRange_get_offset) static bool js_gfx_GFXPushConstantRange_set_offset(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPushConstantRange* cobj = (cocos2d::GFXPushConstantRange*)s.nativeThisObject(); + cc::GFXPushConstantRange* cobj = (cc::GFXPushConstantRange*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPushConstantRange_set_offset : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8882,7 +8882,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPushConstantRange_set_offset) static bool js_gfx_GFXPushConstantRange_get_count(se::State& s) { - cocos2d::GFXPushConstantRange* cobj = (cocos2d::GFXPushConstantRange*)s.nativeThisObject(); + cc::GFXPushConstantRange* cobj = (cc::GFXPushConstantRange*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPushConstantRange_get_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8896,7 +8896,7 @@ SE_BIND_PROP_GET(js_gfx_GFXPushConstantRange_get_count) static bool js_gfx_GFXPushConstantRange_set_count(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPushConstantRange* cobj = (cocos2d::GFXPushConstantRange*)s.nativeThisObject(); + cc::GFXPushConstantRange* cobj = (cc::GFXPushConstantRange*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPushConstantRange_set_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -8908,7 +8908,7 @@ static bool js_gfx_GFXPushConstantRange_set_count(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXPushConstantRange_set_count) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXPushConstantRange_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXPushConstantRange_finalize) static bool js_gfx_GFXPushConstantRange_constructor(se::State& s) { @@ -8918,7 +8918,7 @@ static bool js_gfx_GFXPushConstantRange_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXPushConstantRange* cobj = JSB_ALLOC(cocos2d::GFXPushConstantRange); + cc::GFXPushConstantRange* cobj = JSB_ALLOC(cc::GFXPushConstantRange); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -8928,11 +8928,11 @@ static bool js_gfx_GFXPushConstantRange_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXPushConstantRange* cobj = JSB_ALLOC(cocos2d::GFXPushConstantRange); - cocos2d::GFXShaderType arg0; + cc::GFXPushConstantRange* cobj = JSB_ALLOC(cc::GFXPushConstantRange); + cc::GFXShaderType arg0; json->getProperty("shaderType", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderType = arg0; } unsigned int arg1 = 0; @@ -8960,10 +8960,10 @@ static bool js_gfx_GFXPushConstantRange_constructor(se::State& s) } else if(argc == 3) { - cocos2d::GFXPushConstantRange* cobj = JSB_ALLOC(cocos2d::GFXPushConstantRange); - cocos2d::GFXShaderType arg0; + cc::GFXPushConstantRange* cobj = JSB_ALLOC(cc::GFXPushConstantRange); + cc::GFXShaderType arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShaderType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShaderType)tmp; } while(false); cobj->shaderType = arg0; } unsigned int arg1 = 0; @@ -8991,24 +8991,24 @@ static bool js_gfx_GFXPushConstantRange_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXPushConstantRange_constructor, __jsb_cocos2d_GFXPushConstantRange_class, js_cocos2d_GFXPushConstantRange_finalize) +SE_BIND_CTOR(js_gfx_GFXPushConstantRange_constructor, __jsb_cc_GFXPushConstantRange_class, js_cc_GFXPushConstantRange_finalize) -static bool js_cocos2d_GFXPushConstantRange_finalize(se::State& s) +static bool js_cc_GFXPushConstantRange_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXPushConstantRange)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXPushConstantRange)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXPushConstantRange* cobj = (cocos2d::GFXPushConstantRange*)s.nativeThisObject(); + cc::GFXPushConstantRange* cobj = (cc::GFXPushConstantRange*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXPushConstantRange_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXPushConstantRange_finalize) bool js_register_gfx_GFXPushConstantRange(se::Object* obj) { @@ -9017,23 +9017,23 @@ bool js_register_gfx_GFXPushConstantRange(se::Object* obj) cls->defineProperty("shaderType", _SE(js_gfx_GFXPushConstantRange_get_shaderType), _SE(js_gfx_GFXPushConstantRange_set_shaderType)); cls->defineProperty("offset", _SE(js_gfx_GFXPushConstantRange_get_offset), _SE(js_gfx_GFXPushConstantRange_set_offset)); cls->defineProperty("count", _SE(js_gfx_GFXPushConstantRange_get_count), _SE(js_gfx_GFXPushConstantRange_set_count)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXPushConstantRange_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXPushConstantRange_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXPushConstantRange_proto = cls->getProto(); - __jsb_cocos2d_GFXPushConstantRange_class = cls; + __jsb_cc_GFXPushConstantRange_proto = cls->getProto(); + __jsb_cc_GFXPushConstantRange_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXPipelineLayoutInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXPipelineLayoutInfo_class = nullptr; +se::Object* __jsb_cc_GFXPipelineLayoutInfo_proto = nullptr; +se::Class* __jsb_cc_GFXPipelineLayoutInfo_class = nullptr; static bool js_gfx_GFXPipelineLayoutInfo_get_pushConstantsRanges(se::State& s) { - cocos2d::GFXPipelineLayoutInfo* cobj = (cocos2d::GFXPipelineLayoutInfo*)s.nativeThisObject(); + cc::GFXPipelineLayoutInfo* cobj = (cc::GFXPipelineLayoutInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayoutInfo_get_pushConstantsRanges : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9047,11 +9047,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineLayoutInfo_get_pushConstantsRanges) static bool js_gfx_GFXPipelineLayoutInfo_set_pushConstantsRanges(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineLayoutInfo* cobj = (cocos2d::GFXPipelineLayoutInfo*)s.nativeThisObject(); + cc::GFXPipelineLayoutInfo* cobj = (cc::GFXPipelineLayoutInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayoutInfo_set_pushConstantsRanges : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineLayoutInfo_set_pushConstantsRanges : Error processing new value"); cobj->pushConstantsRanges = arg0; @@ -9061,7 +9061,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineLayoutInfo_set_pushConstantsRanges) static bool js_gfx_GFXPipelineLayoutInfo_get_layouts(se::State& s) { - cocos2d::GFXPipelineLayoutInfo* cobj = (cocos2d::GFXPipelineLayoutInfo*)s.nativeThisObject(); + cc::GFXPipelineLayoutInfo* cobj = (cc::GFXPipelineLayoutInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayoutInfo_get_layouts : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9075,11 +9075,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineLayoutInfo_get_layouts) static bool js_gfx_GFXPipelineLayoutInfo_set_layouts(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineLayoutInfo* cobj = (cocos2d::GFXPipelineLayoutInfo*)s.nativeThisObject(); + cc::GFXPipelineLayoutInfo* cobj = (cc::GFXPipelineLayoutInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayoutInfo_set_layouts : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineLayoutInfo_set_layouts : Error processing new value"); cobj->layouts = arg0; @@ -9087,7 +9087,7 @@ static bool js_gfx_GFXPipelineLayoutInfo_set_layouts(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXPipelineLayoutInfo_set_layouts) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXPipelineLayoutInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXPipelineLayoutInfo_finalize) static bool js_gfx_GFXPipelineLayoutInfo_constructor(se::State& s) { @@ -9097,7 +9097,7 @@ static bool js_gfx_GFXPipelineLayoutInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXPipelineLayoutInfo* cobj = JSB_ALLOC(cocos2d::GFXPipelineLayoutInfo); + cc::GFXPipelineLayoutInfo* cobj = JSB_ALLOC(cc::GFXPipelineLayoutInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -9107,14 +9107,14 @@ static bool js_gfx_GFXPipelineLayoutInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXPipelineLayoutInfo* cobj = JSB_ALLOC(cocos2d::GFXPipelineLayoutInfo); - std::vector arg0; + cc::GFXPipelineLayoutInfo* cobj = JSB_ALLOC(cc::GFXPipelineLayoutInfo); + std::vector arg0; json->getProperty("pushConstantsRanges", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg0); cobj->pushConstantsRanges = arg0; } - std::vector arg1; + std::vector arg1; json->getProperty("layouts", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg1); @@ -9133,13 +9133,13 @@ static bool js_gfx_GFXPipelineLayoutInfo_constructor(se::State& s) } else if(argc == 2) { - cocos2d::GFXPipelineLayoutInfo* cobj = JSB_ALLOC(cocos2d::GFXPipelineLayoutInfo); - std::vector arg0; + cc::GFXPipelineLayoutInfo* cobj = JSB_ALLOC(cc::GFXPipelineLayoutInfo); + std::vector arg0; if (!args[0].isUndefined()) { ok &= seval_to_std_vector(args[0], &arg0); cobj->pushConstantsRanges = arg0; } - std::vector arg1; + std::vector arg1; if (!args[1].isUndefined()) { ok &= seval_to_std_vector(args[1], &arg1); cobj->layouts = arg1; @@ -9159,24 +9159,24 @@ static bool js_gfx_GFXPipelineLayoutInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXPipelineLayoutInfo_constructor, __jsb_cocos2d_GFXPipelineLayoutInfo_class, js_cocos2d_GFXPipelineLayoutInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXPipelineLayoutInfo_constructor, __jsb_cc_GFXPipelineLayoutInfo_class, js_cc_GFXPipelineLayoutInfo_finalize) -static bool js_cocos2d_GFXPipelineLayoutInfo_finalize(se::State& s) +static bool js_cc_GFXPipelineLayoutInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXPipelineLayoutInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXPipelineLayoutInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXPipelineLayoutInfo* cobj = (cocos2d::GFXPipelineLayoutInfo*)s.nativeThisObject(); + cc::GFXPipelineLayoutInfo* cobj = (cc::GFXPipelineLayoutInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXPipelineLayoutInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXPipelineLayoutInfo_finalize) bool js_register_gfx_GFXPipelineLayoutInfo(se::Object* obj) { @@ -9184,23 +9184,23 @@ bool js_register_gfx_GFXPipelineLayoutInfo(se::Object* obj) cls->defineProperty("pushConstantsRanges", _SE(js_gfx_GFXPipelineLayoutInfo_get_pushConstantsRanges), _SE(js_gfx_GFXPipelineLayoutInfo_set_pushConstantsRanges)); cls->defineProperty("layouts", _SE(js_gfx_GFXPipelineLayoutInfo_get_layouts), _SE(js_gfx_GFXPipelineLayoutInfo_set_layouts)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXPipelineLayoutInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXPipelineLayoutInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXPipelineLayoutInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXPipelineLayoutInfo_class = cls; + __jsb_cc_GFXPipelineLayoutInfo_proto = cls->getProto(); + __jsb_cc_GFXPipelineLayoutInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXInputState_proto = nullptr; -se::Class* __jsb_cocos2d_GFXInputState_class = nullptr; +se::Object* __jsb_cc_GFXInputState_proto = nullptr; +se::Class* __jsb_cc_GFXInputState_class = nullptr; static bool js_gfx_GFXInputState_get_attributes(se::State& s) { - cocos2d::GFXInputState* cobj = (cocos2d::GFXInputState*)s.nativeThisObject(); + cc::GFXInputState* cobj = (cc::GFXInputState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputState_get_attributes : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9214,11 +9214,11 @@ SE_BIND_PROP_GET(js_gfx_GFXInputState_get_attributes) static bool js_gfx_GFXInputState_set_attributes(se::State& s) { const auto& args = s.args(); - cocos2d::GFXInputState* cobj = (cocos2d::GFXInputState*)s.nativeThisObject(); + cc::GFXInputState* cobj = (cc::GFXInputState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputState_set_attributes : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputState_set_attributes : Error processing new value"); cobj->attributes = arg0; @@ -9226,7 +9226,7 @@ static bool js_gfx_GFXInputState_set_attributes(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXInputState_set_attributes) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXInputState_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXInputState_finalize) static bool js_gfx_GFXInputState_constructor(se::State& s) { @@ -9236,15 +9236,15 @@ static bool js_gfx_GFXInputState_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXInputState* cobj = JSB_ALLOC(cocos2d::GFXInputState); + cc::GFXInputState* cobj = JSB_ALLOC(cc::GFXInputState); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } else if(argc == 1) { - cocos2d::GFXInputState* cobj = JSB_ALLOC(cocos2d::GFXInputState); - std::vector arg0; + cc::GFXInputState* cobj = JSB_ALLOC(cc::GFXInputState); + std::vector arg0; if (!args[0].isUndefined()) { ok &= seval_to_std_vector(args[0], &arg0); cobj->attributes = arg0; @@ -9264,47 +9264,47 @@ static bool js_gfx_GFXInputState_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXInputState_constructor, __jsb_cocos2d_GFXInputState_class, js_cocos2d_GFXInputState_finalize) +SE_BIND_CTOR(js_gfx_GFXInputState_constructor, __jsb_cc_GFXInputState_class, js_cc_GFXInputState_finalize) -static bool js_cocos2d_GFXInputState_finalize(se::State& s) +static bool js_cc_GFXInputState_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXInputState)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXInputState)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXInputState* cobj = (cocos2d::GFXInputState*)s.nativeThisObject(); + cc::GFXInputState* cobj = (cc::GFXInputState*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXInputState_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXInputState_finalize) bool js_register_gfx_GFXInputState(se::Object* obj) { auto cls = se::Class::create("GFXInputState", obj, nullptr, _SE(js_gfx_GFXInputState_constructor)); cls->defineProperty("attributes", _SE(js_gfx_GFXInputState_get_attributes), _SE(js_gfx_GFXInputState_set_attributes)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXInputState_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXInputState_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXInputState_proto = cls->getProto(); - __jsb_cocos2d_GFXInputState_class = cls; + __jsb_cc_GFXInputState_proto = cls->getProto(); + __jsb_cc_GFXInputState_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXRasterizerState_proto = nullptr; -se::Class* __jsb_cocos2d_GFXRasterizerState_class = nullptr; +se::Object* __jsb_cc_GFXRasterizerState_proto = nullptr; +se::Class* __jsb_cc_GFXRasterizerState_class = nullptr; static bool js_gfx_GFXRasterizerState_get_isDiscard(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_isDiscard : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9318,7 +9318,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_isDiscard) static bool js_gfx_GFXRasterizerState_set_isDiscard(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_isDiscard : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9332,7 +9332,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_isDiscard) static bool js_gfx_GFXRasterizerState_get_polygonMode(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_polygonMode : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9346,12 +9346,12 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_polygonMode) static bool js_gfx_GFXRasterizerState_set_polygonMode(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_polygonMode : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXPolygonMode arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXPolygonMode)tmp; } while(false); + cc::GFXPolygonMode arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXPolygonMode)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXRasterizerState_set_polygonMode : Error processing new value"); cobj->polygonMode = arg0; return true; @@ -9360,7 +9360,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_polygonMode) static bool js_gfx_GFXRasterizerState_get_shadeModel(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_shadeModel : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9374,12 +9374,12 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_shadeModel) static bool js_gfx_GFXRasterizerState_set_shadeModel(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_shadeModel : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXShadeModel arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXShadeModel)tmp; } while(false); + cc::GFXShadeModel arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXShadeModel)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXRasterizerState_set_shadeModel : Error processing new value"); cobj->shadeModel = arg0; return true; @@ -9388,7 +9388,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_shadeModel) static bool js_gfx_GFXRasterizerState_get_cullMode(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_cullMode : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9402,12 +9402,12 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_cullMode) static bool js_gfx_GFXRasterizerState_set_cullMode(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_cullMode : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXCullMode arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXCullMode)tmp; } while(false); + cc::GFXCullMode arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXCullMode)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXRasterizerState_set_cullMode : Error processing new value"); cobj->cullMode = arg0; return true; @@ -9416,7 +9416,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_cullMode) static bool js_gfx_GFXRasterizerState_get_isFrontFaceCCW(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_isFrontFaceCCW : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9430,7 +9430,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_isFrontFaceCCW) static bool js_gfx_GFXRasterizerState_set_isFrontFaceCCW(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_isFrontFaceCCW : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9444,7 +9444,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_isFrontFaceCCW) static bool js_gfx_GFXRasterizerState_get_depthBiasEnabled(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_depthBiasEnabled : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9458,7 +9458,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_depthBiasEnabled) static bool js_gfx_GFXRasterizerState_set_depthBiasEnabled(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_depthBiasEnabled : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9472,7 +9472,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_depthBiasEnabled) static bool js_gfx_GFXRasterizerState_get_depthBias(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_depthBias : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9486,7 +9486,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_depthBias) static bool js_gfx_GFXRasterizerState_set_depthBias(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_depthBias : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9500,7 +9500,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_depthBias) static bool js_gfx_GFXRasterizerState_get_depthBiasClamp(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_depthBiasClamp : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9514,7 +9514,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_depthBiasClamp) static bool js_gfx_GFXRasterizerState_set_depthBiasClamp(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_depthBiasClamp : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9528,7 +9528,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_depthBiasClamp) static bool js_gfx_GFXRasterizerState_get_depthBiasSlop(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_depthBiasSlop : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9542,7 +9542,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_depthBiasSlop) static bool js_gfx_GFXRasterizerState_set_depthBiasSlop(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_depthBiasSlop : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9556,7 +9556,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_depthBiasSlop) static bool js_gfx_GFXRasterizerState_get_isDepthClip(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_isDepthClip : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9570,7 +9570,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_isDepthClip) static bool js_gfx_GFXRasterizerState_set_isDepthClip(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_isDepthClip : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9584,7 +9584,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_isDepthClip) static bool js_gfx_GFXRasterizerState_get_isMultisample(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_isMultisample : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9598,7 +9598,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_isMultisample) static bool js_gfx_GFXRasterizerState_set_isMultisample(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_isMultisample : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9612,7 +9612,7 @@ SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_isMultisample) static bool js_gfx_GFXRasterizerState_get_lineWidth(se::State& s) { - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_get_lineWidth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9626,7 +9626,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRasterizerState_get_lineWidth) static bool js_gfx_GFXRasterizerState_set_lineWidth(se::State& s) { const auto& args = s.args(); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRasterizerState_set_lineWidth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9638,7 +9638,7 @@ static bool js_gfx_GFXRasterizerState_set_lineWidth(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXRasterizerState_set_lineWidth) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXRasterizerState_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXRasterizerState_finalize) static bool js_gfx_GFXRasterizerState_constructor(se::State& s) { @@ -9648,7 +9648,7 @@ static bool js_gfx_GFXRasterizerState_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXRasterizerState* cobj = JSB_ALLOC(cocos2d::GFXRasterizerState); + cc::GFXRasterizerState* cobj = JSB_ALLOC(cc::GFXRasterizerState); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -9658,29 +9658,29 @@ static bool js_gfx_GFXRasterizerState_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXRasterizerState* cobj = JSB_ALLOC(cocos2d::GFXRasterizerState); + cc::GFXRasterizerState* cobj = JSB_ALLOC(cc::GFXRasterizerState); bool arg0; json->getProperty("isDiscard", &field); if(!field.isUndefined()) { ok &= seval_to_boolean(field, &arg0); cobj->isDiscard = arg0; } - cocos2d::GFXPolygonMode arg1; + cc::GFXPolygonMode arg1; json->getProperty("polygonMode", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXPolygonMode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXPolygonMode)tmp; } while(false); cobj->polygonMode = arg1; } - cocos2d::GFXShadeModel arg2; + cc::GFXShadeModel arg2; json->getProperty("shadeModel", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXShadeModel)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXShadeModel)tmp; } while(false); cobj->shadeModel = arg2; } - cocos2d::GFXCullMode arg3; + cc::GFXCullMode arg3; json->getProperty("cullMode", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cocos2d::GFXCullMode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cc::GFXCullMode)tmp; } while(false); cobj->cullMode = arg3; } bool arg4; @@ -9744,25 +9744,25 @@ static bool js_gfx_GFXRasterizerState_constructor(se::State& s) } else if(argc == 12) { - cocos2d::GFXRasterizerState* cobj = JSB_ALLOC(cocos2d::GFXRasterizerState); + cc::GFXRasterizerState* cobj = JSB_ALLOC(cc::GFXRasterizerState); bool arg0; if (!args[0].isUndefined()) { ok &= seval_to_boolean(args[0], &arg0); cobj->isDiscard = arg0; } - cocos2d::GFXPolygonMode arg1; + cc::GFXPolygonMode arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXPolygonMode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXPolygonMode)tmp; } while(false); cobj->polygonMode = arg1; } - cocos2d::GFXShadeModel arg2; + cc::GFXShadeModel arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXShadeModel)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXShadeModel)tmp; } while(false); cobj->shadeModel = arg2; } - cocos2d::GFXCullMode arg3; + cc::GFXCullMode arg3; if (!args[3].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cocos2d::GFXCullMode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cc::GFXCullMode)tmp; } while(false); cobj->cullMode = arg3; } bool arg4; @@ -9820,24 +9820,24 @@ static bool js_gfx_GFXRasterizerState_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXRasterizerState_constructor, __jsb_cocos2d_GFXRasterizerState_class, js_cocos2d_GFXRasterizerState_finalize) +SE_BIND_CTOR(js_gfx_GFXRasterizerState_constructor, __jsb_cc_GFXRasterizerState_class, js_cc_GFXRasterizerState_finalize) -static bool js_cocos2d_GFXRasterizerState_finalize(se::State& s) +static bool js_cc_GFXRasterizerState_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXRasterizerState)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXRasterizerState)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXRasterizerState* cobj = (cocos2d::GFXRasterizerState*)s.nativeThisObject(); + cc::GFXRasterizerState* cobj = (cc::GFXRasterizerState*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXRasterizerState_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXRasterizerState_finalize) bool js_register_gfx_GFXRasterizerState(se::Object* obj) { @@ -9855,23 +9855,23 @@ bool js_register_gfx_GFXRasterizerState(se::Object* obj) cls->defineProperty("isDepthClip", _SE(js_gfx_GFXRasterizerState_get_isDepthClip), _SE(js_gfx_GFXRasterizerState_set_isDepthClip)); cls->defineProperty("isMultisample", _SE(js_gfx_GFXRasterizerState_get_isMultisample), _SE(js_gfx_GFXRasterizerState_set_isMultisample)); cls->defineProperty("lineWidth", _SE(js_gfx_GFXRasterizerState_get_lineWidth), _SE(js_gfx_GFXRasterizerState_set_lineWidth)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXRasterizerState_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXRasterizerState_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXRasterizerState_proto = cls->getProto(); - __jsb_cocos2d_GFXRasterizerState_class = cls; + __jsb_cc_GFXRasterizerState_proto = cls->getProto(); + __jsb_cc_GFXRasterizerState_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXDepthStencilState_proto = nullptr; -se::Class* __jsb_cocos2d_GFXDepthStencilState_class = nullptr; +se::Object* __jsb_cc_GFXDepthStencilState_proto = nullptr; +se::Class* __jsb_cc_GFXDepthStencilState_class = nullptr; static bool js_gfx_GFXDepthStencilState_get_depthTest(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_depthTest : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9885,7 +9885,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_depthTest) static bool js_gfx_GFXDepthStencilState_set_depthTest(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_depthTest : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9899,7 +9899,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_depthTest) static bool js_gfx_GFXDepthStencilState_get_depthWrite(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_depthWrite : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9913,7 +9913,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_depthWrite) static bool js_gfx_GFXDepthStencilState_set_depthWrite(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_depthWrite : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9927,7 +9927,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_depthWrite) static bool js_gfx_GFXDepthStencilState_get_depthFunc(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_depthFunc : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9941,12 +9941,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_depthFunc) static bool js_gfx_GFXDepthStencilState_set_depthFunc(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_depthFunc : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXComparisonFunc arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + cc::GFXComparisonFunc arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXComparisonFunc)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_depthFunc : Error processing new value"); cobj->depthFunc = arg0; return true; @@ -9955,7 +9955,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_depthFunc) static bool js_gfx_GFXDepthStencilState_get_stencilTestFront(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilTestFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9969,7 +9969,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilTestFront) static bool js_gfx_GFXDepthStencilState_set_stencilTestFront(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilTestFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9983,7 +9983,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilTestFront) static bool js_gfx_GFXDepthStencilState_get_stencilFuncFront(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilFuncFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -9997,12 +9997,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilFuncFront) static bool js_gfx_GFXDepthStencilState_set_stencilFuncFront(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilFuncFront : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXComparisonFunc arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + cc::GFXComparisonFunc arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXComparisonFunc)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_stencilFuncFront : Error processing new value"); cobj->stencilFuncFront = arg0; return true; @@ -10011,7 +10011,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilFuncFront) static bool js_gfx_GFXDepthStencilState_get_stencilReadMaskFront(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilReadMaskFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10025,7 +10025,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilReadMaskFront) static bool js_gfx_GFXDepthStencilState_set_stencilReadMaskFront(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilReadMaskFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10039,7 +10039,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilReadMaskFront) static bool js_gfx_GFXDepthStencilState_get_stencilWriteMaskFront(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilWriteMaskFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10053,7 +10053,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilWriteMaskFront) static bool js_gfx_GFXDepthStencilState_set_stencilWriteMaskFront(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilWriteMaskFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10067,7 +10067,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilWriteMaskFront) static bool js_gfx_GFXDepthStencilState_get_stencilFailOpFront(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilFailOpFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10081,12 +10081,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilFailOpFront) static bool js_gfx_GFXDepthStencilState_set_stencilFailOpFront(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilFailOpFront : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStencilOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStencilOp)tmp; } while(false); + cc::GFXStencilOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStencilOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_stencilFailOpFront : Error processing new value"); cobj->stencilFailOpFront = arg0; return true; @@ -10095,7 +10095,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilFailOpFront) static bool js_gfx_GFXDepthStencilState_get_stencilZFailOpFront(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilZFailOpFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10109,12 +10109,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilZFailOpFront) static bool js_gfx_GFXDepthStencilState_set_stencilZFailOpFront(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilZFailOpFront : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStencilOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStencilOp)tmp; } while(false); + cc::GFXStencilOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStencilOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_stencilZFailOpFront : Error processing new value"); cobj->stencilZFailOpFront = arg0; return true; @@ -10123,7 +10123,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilZFailOpFront) static bool js_gfx_GFXDepthStencilState_get_stencilPassOpFront(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilPassOpFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10137,12 +10137,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilPassOpFront) static bool js_gfx_GFXDepthStencilState_set_stencilPassOpFront(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilPassOpFront : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStencilOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStencilOp)tmp; } while(false); + cc::GFXStencilOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStencilOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_stencilPassOpFront : Error processing new value"); cobj->stencilPassOpFront = arg0; return true; @@ -10151,7 +10151,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilPassOpFront) static bool js_gfx_GFXDepthStencilState_get_stencilRefFront(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilRefFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10165,7 +10165,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilRefFront) static bool js_gfx_GFXDepthStencilState_set_stencilRefFront(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilRefFront : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10179,7 +10179,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilRefFront) static bool js_gfx_GFXDepthStencilState_get_stencilTestBack(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilTestBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10193,7 +10193,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilTestBack) static bool js_gfx_GFXDepthStencilState_set_stencilTestBack(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilTestBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10207,7 +10207,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilTestBack) static bool js_gfx_GFXDepthStencilState_get_stencilFuncBack(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilFuncBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10221,12 +10221,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilFuncBack) static bool js_gfx_GFXDepthStencilState_set_stencilFuncBack(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilFuncBack : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXComparisonFunc arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + cc::GFXComparisonFunc arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXComparisonFunc)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_stencilFuncBack : Error processing new value"); cobj->stencilFuncBack = arg0; return true; @@ -10235,7 +10235,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilFuncBack) static bool js_gfx_GFXDepthStencilState_get_stencilReadMaskBack(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilReadMaskBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10249,7 +10249,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilReadMaskBack) static bool js_gfx_GFXDepthStencilState_set_stencilReadMaskBack(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilReadMaskBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10263,7 +10263,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilReadMaskBack) static bool js_gfx_GFXDepthStencilState_get_stencilWriteMaskBack(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilWriteMaskBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10277,7 +10277,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilWriteMaskBack) static bool js_gfx_GFXDepthStencilState_set_stencilWriteMaskBack(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilWriteMaskBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10291,7 +10291,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilWriteMaskBack) static bool js_gfx_GFXDepthStencilState_get_stencilFailOpBack(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilFailOpBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10305,12 +10305,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilFailOpBack) static bool js_gfx_GFXDepthStencilState_set_stencilFailOpBack(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilFailOpBack : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStencilOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStencilOp)tmp; } while(false); + cc::GFXStencilOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStencilOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_stencilFailOpBack : Error processing new value"); cobj->stencilFailOpBack = arg0; return true; @@ -10319,7 +10319,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilFailOpBack) static bool js_gfx_GFXDepthStencilState_get_stencilZFailOpBack(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilZFailOpBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10333,12 +10333,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilZFailOpBack) static bool js_gfx_GFXDepthStencilState_set_stencilZFailOpBack(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilZFailOpBack : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStencilOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStencilOp)tmp; } while(false); + cc::GFXStencilOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStencilOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_stencilZFailOpBack : Error processing new value"); cobj->stencilZFailOpBack = arg0; return true; @@ -10347,7 +10347,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilZFailOpBack) static bool js_gfx_GFXDepthStencilState_get_stencilPassOpBack(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilPassOpBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10361,12 +10361,12 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilPassOpBack) static bool js_gfx_GFXDepthStencilState_set_stencilPassOpBack(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilPassOpBack : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXStencilOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStencilOp)tmp; } while(false); + cc::GFXStencilOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStencilOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDepthStencilState_set_stencilPassOpBack : Error processing new value"); cobj->stencilPassOpBack = arg0; return true; @@ -10375,7 +10375,7 @@ SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilPassOpBack) static bool js_gfx_GFXDepthStencilState_get_stencilRefBack(se::State& s) { - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_get_stencilRefBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10389,7 +10389,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDepthStencilState_get_stencilRefBack) static bool js_gfx_GFXDepthStencilState_set_stencilRefBack(se::State& s) { const auto& args = s.args(); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDepthStencilState_set_stencilRefBack : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10401,7 +10401,7 @@ static bool js_gfx_GFXDepthStencilState_set_stencilRefBack(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXDepthStencilState_set_stencilRefBack) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXDepthStencilState_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXDepthStencilState_finalize) static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) { @@ -10411,7 +10411,7 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXDepthStencilState* cobj = JSB_ALLOC(cocos2d::GFXDepthStencilState); + cc::GFXDepthStencilState* cobj = JSB_ALLOC(cc::GFXDepthStencilState); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -10421,7 +10421,7 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXDepthStencilState* cobj = JSB_ALLOC(cocos2d::GFXDepthStencilState); + cc::GFXDepthStencilState* cobj = JSB_ALLOC(cc::GFXDepthStencilState); bool arg0; json->getProperty("depthTest", &field); if(!field.isUndefined()) { @@ -10434,10 +10434,10 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_boolean(field, &arg1); cobj->depthWrite = arg1; } - cocos2d::GFXComparisonFunc arg2; + cc::GFXComparisonFunc arg2; json->getProperty("depthFunc", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXComparisonFunc)tmp; } while(false); cobj->depthFunc = arg2; } bool arg3; @@ -10446,10 +10446,10 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_boolean(field, &arg3); cobj->stencilTestFront = arg3; } - cocos2d::GFXComparisonFunc arg4; + cc::GFXComparisonFunc arg4; json->getProperty("stencilFuncFront", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cc::GFXComparisonFunc)tmp; } while(false); cobj->stencilFuncFront = arg4; } unsigned int arg5 = 0; @@ -10464,22 +10464,22 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg6); cobj->stencilWriteMaskFront = arg6; } - cocos2d::GFXStencilOp arg7; + cc::GFXStencilOp arg7; json->getProperty("stencilFailOpFront", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg7 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg7 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilFailOpFront = arg7; } - cocos2d::GFXStencilOp arg8; + cc::GFXStencilOp arg8; json->getProperty("stencilZFailOpFront", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg8 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg8 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilZFailOpFront = arg8; } - cocos2d::GFXStencilOp arg9; + cc::GFXStencilOp arg9; json->getProperty("stencilPassOpFront", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg9 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg9 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilPassOpFront = arg9; } unsigned int arg10 = 0; @@ -10494,10 +10494,10 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_boolean(field, &arg11); cobj->stencilTestBack = arg11; } - cocos2d::GFXComparisonFunc arg12; + cc::GFXComparisonFunc arg12; json->getProperty("stencilFuncBack", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg12 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg12 = (cc::GFXComparisonFunc)tmp; } while(false); cobj->stencilFuncBack = arg12; } unsigned int arg13 = 0; @@ -10512,22 +10512,22 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg14); cobj->stencilWriteMaskBack = arg14; } - cocos2d::GFXStencilOp arg15; + cc::GFXStencilOp arg15; json->getProperty("stencilFailOpBack", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg15 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg15 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilFailOpBack = arg15; } - cocos2d::GFXStencilOp arg16; + cc::GFXStencilOp arg16; json->getProperty("stencilZFailOpBack", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg16 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg16 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilZFailOpBack = arg16; } - cocos2d::GFXStencilOp arg17; + cc::GFXStencilOp arg17; json->getProperty("stencilPassOpBack", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg17 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg17 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilPassOpBack = arg17; } unsigned int arg18 = 0; @@ -10549,7 +10549,7 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) } else if(argc == 19) { - cocos2d::GFXDepthStencilState* cobj = JSB_ALLOC(cocos2d::GFXDepthStencilState); + cc::GFXDepthStencilState* cobj = JSB_ALLOC(cc::GFXDepthStencilState); bool arg0; if (!args[0].isUndefined()) { ok &= seval_to_boolean(args[0], &arg0); @@ -10560,9 +10560,9 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_boolean(args[1], &arg1); cobj->depthWrite = arg1; } - cocos2d::GFXComparisonFunc arg2; + cc::GFXComparisonFunc arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXComparisonFunc)tmp; } while(false); cobj->depthFunc = arg2; } bool arg3; @@ -10570,9 +10570,9 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_boolean(args[3], &arg3); cobj->stencilTestFront = arg3; } - cocos2d::GFXComparisonFunc arg4; + cc::GFXComparisonFunc arg4; if (!args[4].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cc::GFXComparisonFunc)tmp; } while(false); cobj->stencilFuncFront = arg4; } unsigned int arg5 = 0; @@ -10585,19 +10585,19 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_uint32(args[6], (uint32_t*)&arg6); cobj->stencilWriteMaskFront = arg6; } - cocos2d::GFXStencilOp arg7; + cc::GFXStencilOp arg7; if (!args[7].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[7], &tmp); arg7 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[7], &tmp); arg7 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilFailOpFront = arg7; } - cocos2d::GFXStencilOp arg8; + cc::GFXStencilOp arg8; if (!args[8].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[8], &tmp); arg8 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[8], &tmp); arg8 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilZFailOpFront = arg8; } - cocos2d::GFXStencilOp arg9; + cc::GFXStencilOp arg9; if (!args[9].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[9], &tmp); arg9 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[9], &tmp); arg9 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilPassOpFront = arg9; } unsigned int arg10 = 0; @@ -10610,9 +10610,9 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_boolean(args[11], &arg11); cobj->stencilTestBack = arg11; } - cocos2d::GFXComparisonFunc arg12; + cc::GFXComparisonFunc arg12; if (!args[12].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[12], &tmp); arg12 = (cocos2d::GFXComparisonFunc)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[12], &tmp); arg12 = (cc::GFXComparisonFunc)tmp; } while(false); cobj->stencilFuncBack = arg12; } unsigned int arg13 = 0; @@ -10625,19 +10625,19 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) ok &= seval_to_uint32(args[14], (uint32_t*)&arg14); cobj->stencilWriteMaskBack = arg14; } - cocos2d::GFXStencilOp arg15; + cc::GFXStencilOp arg15; if (!args[15].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[15], &tmp); arg15 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[15], &tmp); arg15 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilFailOpBack = arg15; } - cocos2d::GFXStencilOp arg16; + cc::GFXStencilOp arg16; if (!args[16].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[16], &tmp); arg16 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[16], &tmp); arg16 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilZFailOpBack = arg16; } - cocos2d::GFXStencilOp arg17; + cc::GFXStencilOp arg17; if (!args[17].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[17], &tmp); arg17 = (cocos2d::GFXStencilOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[17], &tmp); arg17 = (cc::GFXStencilOp)tmp; } while(false); cobj->stencilPassOpBack = arg17; } unsigned int arg18 = 0; @@ -10660,24 +10660,24 @@ static bool js_gfx_GFXDepthStencilState_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXDepthStencilState_constructor, __jsb_cocos2d_GFXDepthStencilState_class, js_cocos2d_GFXDepthStencilState_finalize) +SE_BIND_CTOR(js_gfx_GFXDepthStencilState_constructor, __jsb_cc_GFXDepthStencilState_class, js_cc_GFXDepthStencilState_finalize) -static bool js_cocos2d_GFXDepthStencilState_finalize(se::State& s) +static bool js_cc_GFXDepthStencilState_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXDepthStencilState)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXDepthStencilState)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXDepthStencilState* cobj = (cocos2d::GFXDepthStencilState*)s.nativeThisObject(); + cc::GFXDepthStencilState* cobj = (cc::GFXDepthStencilState*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXDepthStencilState_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXDepthStencilState_finalize) bool js_register_gfx_GFXDepthStencilState(se::Object* obj) { @@ -10702,23 +10702,23 @@ bool js_register_gfx_GFXDepthStencilState(se::Object* obj) cls->defineProperty("stencilZFailOpBack", _SE(js_gfx_GFXDepthStencilState_get_stencilZFailOpBack), _SE(js_gfx_GFXDepthStencilState_set_stencilZFailOpBack)); cls->defineProperty("stencilPassOpBack", _SE(js_gfx_GFXDepthStencilState_get_stencilPassOpBack), _SE(js_gfx_GFXDepthStencilState_set_stencilPassOpBack)); cls->defineProperty("stencilRefBack", _SE(js_gfx_GFXDepthStencilState_get_stencilRefBack), _SE(js_gfx_GFXDepthStencilState_set_stencilRefBack)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXDepthStencilState_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXDepthStencilState_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXDepthStencilState_proto = cls->getProto(); - __jsb_cocos2d_GFXDepthStencilState_class = cls; + __jsb_cc_GFXDepthStencilState_proto = cls->getProto(); + __jsb_cc_GFXDepthStencilState_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBlendTarget_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBlendTarget_class = nullptr; +se::Object* __jsb_cc_GFXBlendTarget_proto = nullptr; +se::Class* __jsb_cc_GFXBlendTarget_class = nullptr; static bool js_gfx_GFXBlendTarget_get_blend(se::State& s) { - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_get_blend : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10732,7 +10732,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendTarget_get_blend) static bool js_gfx_GFXBlendTarget_set_blend(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_set_blend : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10746,7 +10746,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendTarget_set_blend) static bool js_gfx_GFXBlendTarget_get_blendSrc(se::State& s) { - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_get_blendSrc : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10760,12 +10760,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendTarget_get_blendSrc) static bool js_gfx_GFXBlendTarget_set_blendSrc(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_set_blendSrc : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBlendFactor arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBlendFactor)tmp; } while(false); + cc::GFXBlendFactor arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBlendFactor)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendTarget_set_blendSrc : Error processing new value"); cobj->blendSrc = arg0; return true; @@ -10774,7 +10774,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendTarget_set_blendSrc) static bool js_gfx_GFXBlendTarget_get_blendDst(se::State& s) { - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_get_blendDst : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10788,12 +10788,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendTarget_get_blendDst) static bool js_gfx_GFXBlendTarget_set_blendDst(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_set_blendDst : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBlendFactor arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBlendFactor)tmp; } while(false); + cc::GFXBlendFactor arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBlendFactor)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendTarget_set_blendDst : Error processing new value"); cobj->blendDst = arg0; return true; @@ -10802,7 +10802,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendTarget_set_blendDst) static bool js_gfx_GFXBlendTarget_get_blendEq(se::State& s) { - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_get_blendEq : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10816,12 +10816,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendTarget_get_blendEq) static bool js_gfx_GFXBlendTarget_set_blendEq(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_set_blendEq : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBlendOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBlendOp)tmp; } while(false); + cc::GFXBlendOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBlendOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendTarget_set_blendEq : Error processing new value"); cobj->blendEq = arg0; return true; @@ -10830,7 +10830,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendTarget_set_blendEq) static bool js_gfx_GFXBlendTarget_get_blendSrcAlpha(se::State& s) { - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_get_blendSrcAlpha : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10844,12 +10844,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendTarget_get_blendSrcAlpha) static bool js_gfx_GFXBlendTarget_set_blendSrcAlpha(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_set_blendSrcAlpha : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBlendFactor arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBlendFactor)tmp; } while(false); + cc::GFXBlendFactor arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBlendFactor)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendTarget_set_blendSrcAlpha : Error processing new value"); cobj->blendSrcAlpha = arg0; return true; @@ -10858,7 +10858,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendTarget_set_blendSrcAlpha) static bool js_gfx_GFXBlendTarget_get_blendDstAlpha(se::State& s) { - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_get_blendDstAlpha : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10872,12 +10872,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendTarget_get_blendDstAlpha) static bool js_gfx_GFXBlendTarget_set_blendDstAlpha(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_set_blendDstAlpha : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBlendFactor arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBlendFactor)tmp; } while(false); + cc::GFXBlendFactor arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBlendFactor)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendTarget_set_blendDstAlpha : Error processing new value"); cobj->blendDstAlpha = arg0; return true; @@ -10886,7 +10886,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendTarget_set_blendDstAlpha) static bool js_gfx_GFXBlendTarget_get_blendAlphaEq(se::State& s) { - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_get_blendAlphaEq : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10900,12 +10900,12 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendTarget_get_blendAlphaEq) static bool js_gfx_GFXBlendTarget_set_blendAlphaEq(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_set_blendAlphaEq : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBlendOp arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXBlendOp)tmp; } while(false); + cc::GFXBlendOp arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXBlendOp)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendTarget_set_blendAlphaEq : Error processing new value"); cobj->blendAlphaEq = arg0; return true; @@ -10914,7 +10914,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendTarget_set_blendAlphaEq) static bool js_gfx_GFXBlendTarget_get_blendColorMask(se::State& s) { - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_get_blendColorMask : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -10928,19 +10928,19 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendTarget_get_blendColorMask) static bool js_gfx_GFXBlendTarget_set_blendColorMask(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendTarget_set_blendColorMask : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXColorMask arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXColorMask)tmp; } while(false); + cc::GFXColorMask arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXColorMask)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendTarget_set_blendColorMask : Error processing new value"); cobj->blendColorMask = arg0; return true; } SE_BIND_PROP_SET(js_gfx_GFXBlendTarget_set_blendColorMask) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBlendTarget_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBlendTarget_finalize) static bool js_gfx_GFXBlendTarget_constructor(se::State& s) { @@ -10950,7 +10950,7 @@ static bool js_gfx_GFXBlendTarget_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXBlendTarget* cobj = JSB_ALLOC(cocos2d::GFXBlendTarget); + cc::GFXBlendTarget* cobj = JSB_ALLOC(cc::GFXBlendTarget); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -10960,53 +10960,53 @@ static bool js_gfx_GFXBlendTarget_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXBlendTarget* cobj = JSB_ALLOC(cocos2d::GFXBlendTarget); + cc::GFXBlendTarget* cobj = JSB_ALLOC(cc::GFXBlendTarget); bool arg0; json->getProperty("blend", &field); if(!field.isUndefined()) { ok &= seval_to_boolean(field, &arg0); cobj->blend = arg0; } - cocos2d::GFXBlendFactor arg1; + cc::GFXBlendFactor arg1; json->getProperty("blendSrc", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXBlendFactor)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXBlendFactor)tmp; } while(false); cobj->blendSrc = arg1; } - cocos2d::GFXBlendFactor arg2; + cc::GFXBlendFactor arg2; json->getProperty("blendDst", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cocos2d::GFXBlendFactor)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg2 = (cc::GFXBlendFactor)tmp; } while(false); cobj->blendDst = arg2; } - cocos2d::GFXBlendOp arg3; + cc::GFXBlendOp arg3; json->getProperty("blendEq", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cocos2d::GFXBlendOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cc::GFXBlendOp)tmp; } while(false); cobj->blendEq = arg3; } - cocos2d::GFXBlendFactor arg4; + cc::GFXBlendFactor arg4; json->getProperty("blendSrcAlpha", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cocos2d::GFXBlendFactor)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg4 = (cc::GFXBlendFactor)tmp; } while(false); cobj->blendSrcAlpha = arg4; } - cocos2d::GFXBlendFactor arg5; + cc::GFXBlendFactor arg5; json->getProperty("blendDstAlpha", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg5 = (cocos2d::GFXBlendFactor)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg5 = (cc::GFXBlendFactor)tmp; } while(false); cobj->blendDstAlpha = arg5; } - cocos2d::GFXBlendOp arg6; + cc::GFXBlendOp arg6; json->getProperty("blendAlphaEq", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg6 = (cocos2d::GFXBlendOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg6 = (cc::GFXBlendOp)tmp; } while(false); cobj->blendAlphaEq = arg6; } - cocos2d::GFXColorMask arg7; + cc::GFXColorMask arg7; json->getProperty("blendColorMask", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg7 = (cocos2d::GFXColorMask)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg7 = (cc::GFXColorMask)tmp; } while(false); cobj->blendColorMask = arg7; } @@ -11022,45 +11022,45 @@ static bool js_gfx_GFXBlendTarget_constructor(se::State& s) } else if(argc == 8) { - cocos2d::GFXBlendTarget* cobj = JSB_ALLOC(cocos2d::GFXBlendTarget); + cc::GFXBlendTarget* cobj = JSB_ALLOC(cc::GFXBlendTarget); bool arg0; if (!args[0].isUndefined()) { ok &= seval_to_boolean(args[0], &arg0); cobj->blend = arg0; } - cocos2d::GFXBlendFactor arg1; + cc::GFXBlendFactor arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXBlendFactor)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXBlendFactor)tmp; } while(false); cobj->blendSrc = arg1; } - cocos2d::GFXBlendFactor arg2; + cc::GFXBlendFactor arg2; if (!args[2].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXBlendFactor)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXBlendFactor)tmp; } while(false); cobj->blendDst = arg2; } - cocos2d::GFXBlendOp arg3; + cc::GFXBlendOp arg3; if (!args[3].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cocos2d::GFXBlendOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cc::GFXBlendOp)tmp; } while(false); cobj->blendEq = arg3; } - cocos2d::GFXBlendFactor arg4; + cc::GFXBlendFactor arg4; if (!args[4].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cocos2d::GFXBlendFactor)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[4], &tmp); arg4 = (cc::GFXBlendFactor)tmp; } while(false); cobj->blendSrcAlpha = arg4; } - cocos2d::GFXBlendFactor arg5; + cc::GFXBlendFactor arg5; if (!args[5].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[5], &tmp); arg5 = (cocos2d::GFXBlendFactor)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[5], &tmp); arg5 = (cc::GFXBlendFactor)tmp; } while(false); cobj->blendDstAlpha = arg5; } - cocos2d::GFXBlendOp arg6; + cc::GFXBlendOp arg6; if (!args[6].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[6], &tmp); arg6 = (cocos2d::GFXBlendOp)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[6], &tmp); arg6 = (cc::GFXBlendOp)tmp; } while(false); cobj->blendAlphaEq = arg6; } - cocos2d::GFXColorMask arg7; + cc::GFXColorMask arg7; if (!args[7].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[7], &tmp); arg7 = (cocos2d::GFXColorMask)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[7], &tmp); arg7 = (cc::GFXColorMask)tmp; } while(false); cobj->blendColorMask = arg7; } @@ -11078,24 +11078,24 @@ static bool js_gfx_GFXBlendTarget_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXBlendTarget_constructor, __jsb_cocos2d_GFXBlendTarget_class, js_cocos2d_GFXBlendTarget_finalize) +SE_BIND_CTOR(js_gfx_GFXBlendTarget_constructor, __jsb_cc_GFXBlendTarget_class, js_cc_GFXBlendTarget_finalize) -static bool js_cocos2d_GFXBlendTarget_finalize(se::State& s) +static bool js_cc_GFXBlendTarget_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBlendTarget)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBlendTarget)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBlendTarget* cobj = (cocos2d::GFXBlendTarget*)s.nativeThisObject(); + cc::GFXBlendTarget* cobj = (cc::GFXBlendTarget*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBlendTarget_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBlendTarget_finalize) bool js_register_gfx_GFXBlendTarget(se::Object* obj) { @@ -11109,23 +11109,23 @@ bool js_register_gfx_GFXBlendTarget(se::Object* obj) cls->defineProperty("blendDstAlpha", _SE(js_gfx_GFXBlendTarget_get_blendDstAlpha), _SE(js_gfx_GFXBlendTarget_set_blendDstAlpha)); cls->defineProperty("blendAlphaEq", _SE(js_gfx_GFXBlendTarget_get_blendAlphaEq), _SE(js_gfx_GFXBlendTarget_set_blendAlphaEq)); cls->defineProperty("blendColorMask", _SE(js_gfx_GFXBlendTarget_get_blendColorMask), _SE(js_gfx_GFXBlendTarget_set_blendColorMask)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBlendTarget_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBlendTarget_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBlendTarget_proto = cls->getProto(); - __jsb_cocos2d_GFXBlendTarget_class = cls; + __jsb_cc_GFXBlendTarget_proto = cls->getProto(); + __jsb_cc_GFXBlendTarget_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBlendState_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBlendState_class = nullptr; +se::Object* __jsb_cc_GFXBlendState_proto = nullptr; +se::Class* __jsb_cc_GFXBlendState_class = nullptr; static bool js_gfx_GFXBlendState_get_isA2C(se::State& s) { - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendState_get_isA2C : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11139,7 +11139,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendState_get_isA2C) static bool js_gfx_GFXBlendState_set_isA2C(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendState_set_isA2C : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11153,7 +11153,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendState_set_isA2C) static bool js_gfx_GFXBlendState_get_isIndepend(se::State& s) { - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendState_get_isIndepend : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11167,7 +11167,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendState_get_isIndepend) static bool js_gfx_GFXBlendState_set_isIndepend(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendState_set_isIndepend : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11181,7 +11181,7 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendState_set_isIndepend) static bool js_gfx_GFXBlendState_get_blendColor(se::State& s) { - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendState_get_blendColor : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11195,11 +11195,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendState_get_blendColor) static bool js_gfx_GFXBlendState_set_blendColor(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendState_set_blendColor : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXColor* arg0 = nullptr; + cc::GFXColor* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendState_set_blendColor : Error processing new value"); cobj->blendColor = *arg0; @@ -11207,7 +11207,7 @@ static bool js_gfx_GFXBlendState_set_blendColor(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXBlendState_set_blendColor) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBlendState_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBlendState_finalize) static bool js_gfx_GFXBlendState_constructor(se::State& s) { @@ -11217,7 +11217,7 @@ static bool js_gfx_GFXBlendState_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXBlendState* cobj = JSB_ALLOC(cocos2d::GFXBlendState); + cc::GFXBlendState* cobj = JSB_ALLOC(cc::GFXBlendState); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -11227,7 +11227,7 @@ static bool js_gfx_GFXBlendState_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXBlendState* cobj = JSB_ALLOC(cocos2d::GFXBlendState); + cc::GFXBlendState* cobj = JSB_ALLOC(cc::GFXBlendState); bool arg0; json->getProperty("isA2C", &field); if(!field.isUndefined()) { @@ -11240,13 +11240,13 @@ static bool js_gfx_GFXBlendState_constructor(se::State& s) ok &= seval_to_boolean(field, &arg1); cobj->isIndepend = arg1; } - cocos2d::GFXColor* arg2 = nullptr; + cc::GFXColor* arg2 = nullptr; json->getProperty("blendColor", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg2); cobj->blendColor = *arg2; } - std::vector arg3; + std::vector arg3; json->getProperty("targets", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg3); @@ -11265,7 +11265,7 @@ static bool js_gfx_GFXBlendState_constructor(se::State& s) } else if(argc == 4) { - cocos2d::GFXBlendState* cobj = JSB_ALLOC(cocos2d::GFXBlendState); + cc::GFXBlendState* cobj = JSB_ALLOC(cc::GFXBlendState); bool arg0; if (!args[0].isUndefined()) { ok &= seval_to_boolean(args[0], &arg0); @@ -11276,12 +11276,12 @@ static bool js_gfx_GFXBlendState_constructor(se::State& s) ok &= seval_to_boolean(args[1], &arg1); cobj->isIndepend = arg1; } - cocos2d::GFXColor* arg2 = nullptr; + cc::GFXColor* arg2 = nullptr; if (!args[2].isUndefined()) { ok &= seval_to_reference(args[2], &arg2); cobj->blendColor = *arg2; } - std::vector arg3; + std::vector arg3; if (!args[3].isUndefined()) { ok &= seval_to_std_vector(args[3], &arg3); cobj->targets = arg3; @@ -11301,24 +11301,24 @@ static bool js_gfx_GFXBlendState_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXBlendState_constructor, __jsb_cocos2d_GFXBlendState_class, js_cocos2d_GFXBlendState_finalize) +SE_BIND_CTOR(js_gfx_GFXBlendState_constructor, __jsb_cc_GFXBlendState_class, js_cc_GFXBlendState_finalize) -static bool js_cocos2d_GFXBlendState_finalize(se::State& s) +static bool js_cc_GFXBlendState_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBlendState)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBlendState)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBlendState_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBlendState_finalize) bool js_register_gfx_GFXBlendState(se::Object* obj) { @@ -11327,23 +11327,23 @@ bool js_register_gfx_GFXBlendState(se::Object* obj) cls->defineProperty("isA2C", _SE(js_gfx_GFXBlendState_get_isA2C), _SE(js_gfx_GFXBlendState_set_isA2C)); cls->defineProperty("isIndepend", _SE(js_gfx_GFXBlendState_get_isIndepend), _SE(js_gfx_GFXBlendState_set_isIndepend)); cls->defineProperty("blendColor", _SE(js_gfx_GFXBlendState_get_blendColor), _SE(js_gfx_GFXBlendState_set_blendColor)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBlendState_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBlendState_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBlendState_proto = cls->getProto(); - __jsb_cocos2d_GFXBlendState_class = cls; + __jsb_cc_GFXBlendState_proto = cls->getProto(); + __jsb_cc_GFXBlendState_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXPipelineStateInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXPipelineStateInfo_class = nullptr; +se::Object* __jsb_cc_GFXPipelineStateInfo_proto = nullptr; +se::Class* __jsb_cc_GFXPipelineStateInfo_class = nullptr; static bool js_gfx_GFXPipelineStateInfo_get_primitive(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_primitive : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11357,12 +11357,12 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_primitive) static bool js_gfx_GFXPipelineStateInfo_set_primitive(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_primitive : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXPrimitiveMode arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXPrimitiveMode)tmp; } while(false); + cc::GFXPrimitiveMode arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXPrimitiveMode)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_primitive : Error processing new value"); cobj->primitive = arg0; return true; @@ -11371,7 +11371,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_primitive) static bool js_gfx_GFXPipelineStateInfo_get_shader(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_shader : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11385,11 +11385,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_shader) static bool js_gfx_GFXPipelineStateInfo_set_shader(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_shader : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXShader* arg0 = nullptr; + cc::GFXShader* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_shader : Error processing new value"); cobj->shader = arg0; @@ -11399,7 +11399,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_shader) static bool js_gfx_GFXPipelineStateInfo_get_inputState(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_inputState : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11413,11 +11413,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_inputState) static bool js_gfx_GFXPipelineStateInfo_set_inputState(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_inputState : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXInputState* arg0 = nullptr; + cc::GFXInputState* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_inputState : Error processing new value"); cobj->inputState = *arg0; @@ -11427,7 +11427,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_inputState) static bool js_gfx_GFXPipelineStateInfo_get_rasterizerState(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_rasterizerState : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11441,11 +11441,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_rasterizerState) static bool js_gfx_GFXPipelineStateInfo_set_rasterizerState(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_rasterizerState : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXRasterizerState* arg0 = nullptr; + cc::GFXRasterizerState* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_rasterizerState : Error processing new value"); cobj->rasterizerState = *arg0; @@ -11455,7 +11455,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_rasterizerState) static bool js_gfx_GFXPipelineStateInfo_get_depthStencilState(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_depthStencilState : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11469,11 +11469,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_depthStencilState) static bool js_gfx_GFXPipelineStateInfo_set_depthStencilState(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_depthStencilState : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXDepthStencilState* arg0 = nullptr; + cc::GFXDepthStencilState* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_depthStencilState : Error processing new value"); cobj->depthStencilState = *arg0; @@ -11483,7 +11483,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_depthStencilState) static bool js_gfx_GFXPipelineStateInfo_get_blendState(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_blendState : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11497,11 +11497,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_blendState) static bool js_gfx_GFXPipelineStateInfo_set_blendState(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_blendState : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXBlendState* arg0 = nullptr; + cc::GFXBlendState* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_blendState : Error processing new value"); cobj->blendState = *arg0; @@ -11511,7 +11511,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_blendState) static bool js_gfx_GFXPipelineStateInfo_get_dynamicStates(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_dynamicStates : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11525,11 +11525,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_dynamicStates) static bool js_gfx_GFXPipelineStateInfo_set_dynamicStates(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_dynamicStates : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_dynamicStates : Error processing new value"); cobj->dynamicStates = arg0; @@ -11539,7 +11539,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_dynamicStates) static bool js_gfx_GFXPipelineStateInfo_get_layout(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_layout : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11553,11 +11553,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_layout) static bool js_gfx_GFXPipelineStateInfo_set_layout(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_layout : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXPipelineLayout* arg0 = nullptr; + cc::GFXPipelineLayout* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_layout : Error processing new value"); cobj->layout = arg0; @@ -11567,7 +11567,7 @@ SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_layout) static bool js_gfx_GFXPipelineStateInfo_get_renderPass(se::State& s) { - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_get_renderPass : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11581,11 +11581,11 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineStateInfo_get_renderPass) static bool js_gfx_GFXPipelineStateInfo_set_renderPass(se::State& s) { const auto& args = s.args(); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineStateInfo_set_renderPass : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXRenderPass* arg0 = nullptr; + cc::GFXRenderPass* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineStateInfo_set_renderPass : Error processing new value"); cobj->renderPass = arg0; @@ -11593,7 +11593,7 @@ static bool js_gfx_GFXPipelineStateInfo_set_renderPass(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXPipelineStateInfo_set_renderPass) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXPipelineStateInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXPipelineStateInfo_finalize) static bool js_gfx_GFXPipelineStateInfo_constructor(se::State& s) { @@ -11603,7 +11603,7 @@ static bool js_gfx_GFXPipelineStateInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXPipelineStateInfo* cobj = JSB_ALLOC(cocos2d::GFXPipelineStateInfo); + cc::GFXPipelineStateInfo* cobj = JSB_ALLOC(cc::GFXPipelineStateInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -11613,56 +11613,56 @@ static bool js_gfx_GFXPipelineStateInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXPipelineStateInfo* cobj = JSB_ALLOC(cocos2d::GFXPipelineStateInfo); - cocos2d::GFXPrimitiveMode arg0; + cc::GFXPipelineStateInfo* cobj = JSB_ALLOC(cc::GFXPipelineStateInfo); + cc::GFXPrimitiveMode arg0; json->getProperty("primitive", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXPrimitiveMode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXPrimitiveMode)tmp; } while(false); cobj->primitive = arg0; } - cocos2d::GFXShader* arg1 = nullptr; + cc::GFXShader* arg1 = nullptr; json->getProperty("shader", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg1); cobj->shader = arg1; } - cocos2d::GFXInputState* arg2 = nullptr; + cc::GFXInputState* arg2 = nullptr; json->getProperty("inputState", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg2); cobj->inputState = *arg2; } - cocos2d::GFXRasterizerState* arg3 = nullptr; + cc::GFXRasterizerState* arg3 = nullptr; json->getProperty("rasterizerState", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg3); cobj->rasterizerState = *arg3; } - cocos2d::GFXDepthStencilState* arg4 = nullptr; + cc::GFXDepthStencilState* arg4 = nullptr; json->getProperty("depthStencilState", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg4); cobj->depthStencilState = *arg4; } - cocos2d::GFXBlendState* arg5 = nullptr; + cc::GFXBlendState* arg5 = nullptr; json->getProperty("blendState", &field); if(!field.isUndefined()) { ok &= seval_to_reference(field, &arg5); cobj->blendState = *arg5; } - std::vector arg6; + std::vector arg6; json->getProperty("dynamicStates", &field); if(!field.isUndefined()) { ok &= seval_to_std_vector(field, &arg6); cobj->dynamicStates = arg6; } - cocos2d::GFXPipelineLayout* arg7 = nullptr; + cc::GFXPipelineLayout* arg7 = nullptr; json->getProperty("layout", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg7); cobj->layout = arg7; } - cocos2d::GFXRenderPass* arg8 = nullptr; + cc::GFXRenderPass* arg8 = nullptr; json->getProperty("renderPass", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg8); @@ -11681,48 +11681,48 @@ static bool js_gfx_GFXPipelineStateInfo_constructor(se::State& s) } else if(argc == 9) { - cocos2d::GFXPipelineStateInfo* cobj = JSB_ALLOC(cocos2d::GFXPipelineStateInfo); - cocos2d::GFXPrimitiveMode arg0; + cc::GFXPipelineStateInfo* cobj = JSB_ALLOC(cc::GFXPipelineStateInfo); + cc::GFXPrimitiveMode arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXPrimitiveMode)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXPrimitiveMode)tmp; } while(false); cobj->primitive = arg0; } - cocos2d::GFXShader* arg1 = nullptr; + cc::GFXShader* arg1 = nullptr; if (!args[1].isUndefined()) { ok &= seval_to_native_ptr(args[1], &arg1); cobj->shader = arg1; } - cocos2d::GFXInputState* arg2 = nullptr; + cc::GFXInputState* arg2 = nullptr; if (!args[2].isUndefined()) { ok &= seval_to_reference(args[2], &arg2); cobj->inputState = *arg2; } - cocos2d::GFXRasterizerState* arg3 = nullptr; + cc::GFXRasterizerState* arg3 = nullptr; if (!args[3].isUndefined()) { ok &= seval_to_reference(args[3], &arg3); cobj->rasterizerState = *arg3; } - cocos2d::GFXDepthStencilState* arg4 = nullptr; + cc::GFXDepthStencilState* arg4 = nullptr; if (!args[4].isUndefined()) { ok &= seval_to_reference(args[4], &arg4); cobj->depthStencilState = *arg4; } - cocos2d::GFXBlendState* arg5 = nullptr; + cc::GFXBlendState* arg5 = nullptr; if (!args[5].isUndefined()) { ok &= seval_to_reference(args[5], &arg5); cobj->blendState = *arg5; } - std::vector arg6; + std::vector arg6; if (!args[6].isUndefined()) { ok &= seval_to_std_vector(args[6], &arg6); cobj->dynamicStates = arg6; } - cocos2d::GFXPipelineLayout* arg7 = nullptr; + cc::GFXPipelineLayout* arg7 = nullptr; if (!args[7].isUndefined()) { ok &= seval_to_native_ptr(args[7], &arg7); cobj->layout = arg7; } - cocos2d::GFXRenderPass* arg8 = nullptr; + cc::GFXRenderPass* arg8 = nullptr; if (!args[8].isUndefined()) { ok &= seval_to_native_ptr(args[8], &arg8); cobj->renderPass = arg8; @@ -11742,24 +11742,24 @@ static bool js_gfx_GFXPipelineStateInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXPipelineStateInfo_constructor, __jsb_cocos2d_GFXPipelineStateInfo_class, js_cocos2d_GFXPipelineStateInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXPipelineStateInfo_constructor, __jsb_cc_GFXPipelineStateInfo_class, js_cc_GFXPipelineStateInfo_finalize) -static bool js_cocos2d_GFXPipelineStateInfo_finalize(se::State& s) +static bool js_cc_GFXPipelineStateInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXPipelineStateInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXPipelineStateInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXPipelineStateInfo* cobj = (cocos2d::GFXPipelineStateInfo*)s.nativeThisObject(); + cc::GFXPipelineStateInfo* cobj = (cc::GFXPipelineStateInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXPipelineStateInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXPipelineStateInfo_finalize) bool js_register_gfx_GFXPipelineStateInfo(se::Object* obj) { @@ -11774,23 +11774,23 @@ bool js_register_gfx_GFXPipelineStateInfo(se::Object* obj) cls->defineProperty("dynamicStates", _SE(js_gfx_GFXPipelineStateInfo_get_dynamicStates), _SE(js_gfx_GFXPipelineStateInfo_set_dynamicStates)); cls->defineProperty("layout", _SE(js_gfx_GFXPipelineStateInfo_get_layout), _SE(js_gfx_GFXPipelineStateInfo_set_layout)); cls->defineProperty("renderPass", _SE(js_gfx_GFXPipelineStateInfo_get_renderPass), _SE(js_gfx_GFXPipelineStateInfo_set_renderPass)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXPipelineStateInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXPipelineStateInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXPipelineStateInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXPipelineStateInfo_class = cls; + __jsb_cc_GFXPipelineStateInfo_proto = cls->getProto(); + __jsb_cc_GFXPipelineStateInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXCommandBufferInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXCommandBufferInfo_class = nullptr; +se::Object* __jsb_cc_GFXCommandBufferInfo_proto = nullptr; +se::Class* __jsb_cc_GFXCommandBufferInfo_class = nullptr; static bool js_gfx_GFXCommandBufferInfo_get_allocator(se::State& s) { - cocos2d::GFXCommandBufferInfo* cobj = (cocos2d::GFXCommandBufferInfo*)s.nativeThisObject(); + cc::GFXCommandBufferInfo* cobj = (cc::GFXCommandBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBufferInfo_get_allocator : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11804,11 +11804,11 @@ SE_BIND_PROP_GET(js_gfx_GFXCommandBufferInfo_get_allocator) static bool js_gfx_GFXCommandBufferInfo_set_allocator(se::State& s) { const auto& args = s.args(); - cocos2d::GFXCommandBufferInfo* cobj = (cocos2d::GFXCommandBufferInfo*)s.nativeThisObject(); + cc::GFXCommandBufferInfo* cobj = (cc::GFXCommandBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBufferInfo_set_allocator : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXCommandAllocator* arg0 = nullptr; + cc::GFXCommandAllocator* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBufferInfo_set_allocator : Error processing new value"); cobj->allocator = arg0; @@ -11818,7 +11818,7 @@ SE_BIND_PROP_SET(js_gfx_GFXCommandBufferInfo_set_allocator) static bool js_gfx_GFXCommandBufferInfo_get_type(se::State& s) { - cocos2d::GFXCommandBufferInfo* cobj = (cocos2d::GFXCommandBufferInfo*)s.nativeThisObject(); + cc::GFXCommandBufferInfo* cobj = (cc::GFXCommandBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBufferInfo_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11832,19 +11832,19 @@ SE_BIND_PROP_GET(js_gfx_GFXCommandBufferInfo_get_type) static bool js_gfx_GFXCommandBufferInfo_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXCommandBufferInfo* cobj = (cocos2d::GFXCommandBufferInfo*)s.nativeThisObject(); + cc::GFXCommandBufferInfo* cobj = (cc::GFXCommandBufferInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBufferInfo_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXCommandBufferType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXCommandBufferType)tmp; } while(false); + cc::GFXCommandBufferType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXCommandBufferType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBufferInfo_set_type : Error processing new value"); cobj->type = arg0; return true; } SE_BIND_PROP_SET(js_gfx_GFXCommandBufferInfo_set_type) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXCommandBufferInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXCommandBufferInfo_finalize) static bool js_gfx_GFXCommandBufferInfo_constructor(se::State& s) { @@ -11854,7 +11854,7 @@ static bool js_gfx_GFXCommandBufferInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXCommandBufferInfo* cobj = JSB_ALLOC(cocos2d::GFXCommandBufferInfo); + cc::GFXCommandBufferInfo* cobj = JSB_ALLOC(cc::GFXCommandBufferInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -11864,17 +11864,17 @@ static bool js_gfx_GFXCommandBufferInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXCommandBufferInfo* cobj = JSB_ALLOC(cocos2d::GFXCommandBufferInfo); - cocos2d::GFXCommandAllocator* arg0 = nullptr; + cc::GFXCommandBufferInfo* cobj = JSB_ALLOC(cc::GFXCommandBufferInfo); + cc::GFXCommandAllocator* arg0 = nullptr; json->getProperty("allocator", &field); if(!field.isUndefined()) { ok &= seval_to_native_ptr(field, &arg0); cobj->allocator = arg0; } - cocos2d::GFXCommandBufferType arg1; + cc::GFXCommandBufferType arg1; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cocos2d::GFXCommandBufferType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg1 = (cc::GFXCommandBufferType)tmp; } while(false); cobj->type = arg1; } @@ -11890,15 +11890,15 @@ static bool js_gfx_GFXCommandBufferInfo_constructor(se::State& s) } else if(argc == 2) { - cocos2d::GFXCommandBufferInfo* cobj = JSB_ALLOC(cocos2d::GFXCommandBufferInfo); - cocos2d::GFXCommandAllocator* arg0 = nullptr; + cc::GFXCommandBufferInfo* cobj = JSB_ALLOC(cc::GFXCommandBufferInfo); + cc::GFXCommandAllocator* arg0 = nullptr; if (!args[0].isUndefined()) { ok &= seval_to_native_ptr(args[0], &arg0); cobj->allocator = arg0; } - cocos2d::GFXCommandBufferType arg1; + cc::GFXCommandBufferType arg1; if (!args[1].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cocos2d::GFXCommandBufferType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (cc::GFXCommandBufferType)tmp; } while(false); cobj->type = arg1; } @@ -11916,24 +11916,24 @@ static bool js_gfx_GFXCommandBufferInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXCommandBufferInfo_constructor, __jsb_cocos2d_GFXCommandBufferInfo_class, js_cocos2d_GFXCommandBufferInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXCommandBufferInfo_constructor, __jsb_cc_GFXCommandBufferInfo_class, js_cc_GFXCommandBufferInfo_finalize) -static bool js_cocos2d_GFXCommandBufferInfo_finalize(se::State& s) +static bool js_cc_GFXCommandBufferInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXCommandBufferInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXCommandBufferInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXCommandBufferInfo* cobj = (cocos2d::GFXCommandBufferInfo*)s.nativeThisObject(); + cc::GFXCommandBufferInfo* cobj = (cc::GFXCommandBufferInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXCommandBufferInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXCommandBufferInfo_finalize) bool js_register_gfx_GFXCommandBufferInfo(se::Object* obj) { @@ -11941,23 +11941,23 @@ bool js_register_gfx_GFXCommandBufferInfo(se::Object* obj) cls->defineProperty("allocator", _SE(js_gfx_GFXCommandBufferInfo_get_allocator), _SE(js_gfx_GFXCommandBufferInfo_set_allocator)); cls->defineProperty("type", _SE(js_gfx_GFXCommandBufferInfo_get_type), _SE(js_gfx_GFXCommandBufferInfo_set_type)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXCommandBufferInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXCommandBufferInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXCommandBufferInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXCommandBufferInfo_class = cls; + __jsb_cc_GFXCommandBufferInfo_proto = cls->getProto(); + __jsb_cc_GFXCommandBufferInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXQueueInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXQueueInfo_class = nullptr; +se::Object* __jsb_cc_GFXQueueInfo_proto = nullptr; +se::Class* __jsb_cc_GFXQueueInfo_class = nullptr; static bool js_gfx_GFXQueueInfo_get_type(se::State& s) { - cocos2d::GFXQueueInfo* cobj = (cocos2d::GFXQueueInfo*)s.nativeThisObject(); + cc::GFXQueueInfo* cobj = (cc::GFXQueueInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXQueueInfo_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -11971,19 +11971,19 @@ SE_BIND_PROP_GET(js_gfx_GFXQueueInfo_get_type) static bool js_gfx_GFXQueueInfo_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXQueueInfo* cobj = (cocos2d::GFXQueueInfo*)s.nativeThisObject(); + cc::GFXQueueInfo* cobj = (cc::GFXQueueInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXQueueInfo_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXQueueType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXQueueType)tmp; } while(false); + cc::GFXQueueType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXQueueType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXQueueInfo_set_type : Error processing new value"); cobj->type = arg0; return true; } SE_BIND_PROP_SET(js_gfx_GFXQueueInfo_set_type) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXQueueInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXQueueInfo_finalize) static bool js_gfx_GFXQueueInfo_constructor(se::State& s) { @@ -11993,17 +11993,17 @@ static bool js_gfx_GFXQueueInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXQueueInfo* cobj = JSB_ALLOC(cocos2d::GFXQueueInfo); + cc::GFXQueueInfo* cobj = JSB_ALLOC(cc::GFXQueueInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } else if(argc == 1) { - cocos2d::GFXQueueInfo* cobj = JSB_ALLOC(cocos2d::GFXQueueInfo); - cocos2d::GFXQueueType arg0; + cc::GFXQueueInfo* cobj = JSB_ALLOC(cc::GFXQueueInfo); + cc::GFXQueueType arg0; if (!args[0].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXQueueType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXQueueType)tmp; } while(false); cobj->type = arg0; } @@ -12021,47 +12021,47 @@ static bool js_gfx_GFXQueueInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXQueueInfo_constructor, __jsb_cocos2d_GFXQueueInfo_class, js_cocos2d_GFXQueueInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXQueueInfo_constructor, __jsb_cc_GFXQueueInfo_class, js_cc_GFXQueueInfo_finalize) -static bool js_cocos2d_GFXQueueInfo_finalize(se::State& s) +static bool js_cc_GFXQueueInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXQueueInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXQueueInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXQueueInfo* cobj = (cocos2d::GFXQueueInfo*)s.nativeThisObject(); + cc::GFXQueueInfo* cobj = (cc::GFXQueueInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXQueueInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXQueueInfo_finalize) bool js_register_gfx_GFXQueueInfo(se::Object* obj) { auto cls = se::Class::create("GFXQueueInfo", obj, nullptr, _SE(js_gfx_GFXQueueInfo_constructor)); cls->defineProperty("type", _SE(js_gfx_GFXQueueInfo_get_type), _SE(js_gfx_GFXQueueInfo_set_type)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXQueueInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXQueueInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXQueueInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXQueueInfo_class = cls; + __jsb_cc_GFXQueueInfo_proto = cls->getProto(); + __jsb_cc_GFXQueueInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXFormatInfo_proto = nullptr; -se::Class* __jsb_cocos2d_GFXFormatInfo_class = nullptr; +se::Object* __jsb_cc_GFXFormatInfo_proto = nullptr; +se::Class* __jsb_cc_GFXFormatInfo_class = nullptr; static bool js_gfx_GFXFormatInfo_get_name(se::State& s) { - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_get_name : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12075,11 +12075,11 @@ SE_BIND_PROP_GET(js_gfx_GFXFormatInfo_get_name) static bool js_gfx_GFXFormatInfo_set_name(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_set_name : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXFormatInfo_set_name : Error processing new value"); cobj->name = arg0; @@ -12089,7 +12089,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFormatInfo_set_name) static bool js_gfx_GFXFormatInfo_get_size(se::State& s) { - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_get_size : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12103,7 +12103,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFormatInfo_get_size) static bool js_gfx_GFXFormatInfo_set_size(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_set_size : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12117,7 +12117,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFormatInfo_set_size) static bool js_gfx_GFXFormatInfo_get_count(se::State& s) { - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_get_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12131,7 +12131,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFormatInfo_get_count) static bool js_gfx_GFXFormatInfo_set_count(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_set_count : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12145,7 +12145,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFormatInfo_set_count) static bool js_gfx_GFXFormatInfo_get_type(se::State& s) { - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_get_type : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12159,12 +12159,12 @@ SE_BIND_PROP_GET(js_gfx_GFXFormatInfo_get_type) static bool js_gfx_GFXFormatInfo_set_type(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_set_type : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXFormatType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFormatType)tmp; } while(false); + cc::GFXFormatType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFormatType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXFormatInfo_set_type : Error processing new value"); cobj->type = arg0; return true; @@ -12173,7 +12173,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFormatInfo_set_type) static bool js_gfx_GFXFormatInfo_get_hasAlpha(se::State& s) { - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_get_hasAlpha : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12187,7 +12187,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFormatInfo_get_hasAlpha) static bool js_gfx_GFXFormatInfo_set_hasAlpha(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_set_hasAlpha : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12201,7 +12201,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFormatInfo_set_hasAlpha) static bool js_gfx_GFXFormatInfo_get_hasDepth(se::State& s) { - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_get_hasDepth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12215,7 +12215,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFormatInfo_get_hasDepth) static bool js_gfx_GFXFormatInfo_set_hasDepth(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_set_hasDepth : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12229,7 +12229,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFormatInfo_set_hasDepth) static bool js_gfx_GFXFormatInfo_get_hasStencil(se::State& s) { - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_get_hasStencil : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12243,7 +12243,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFormatInfo_get_hasStencil) static bool js_gfx_GFXFormatInfo_set_hasStencil(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_set_hasStencil : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12257,7 +12257,7 @@ SE_BIND_PROP_SET(js_gfx_GFXFormatInfo_set_hasStencil) static bool js_gfx_GFXFormatInfo_get_isCompressed(se::State& s) { - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_get_isCompressed : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12271,7 +12271,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFormatInfo_get_isCompressed) static bool js_gfx_GFXFormatInfo_set_isCompressed(se::State& s) { const auto& args = s.args(); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFormatInfo_set_isCompressed : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12283,7 +12283,7 @@ static bool js_gfx_GFXFormatInfo_set_isCompressed(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXFormatInfo_set_isCompressed) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXFormatInfo_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXFormatInfo_finalize) static bool js_gfx_GFXFormatInfo_constructor(se::State& s) { @@ -12293,7 +12293,7 @@ static bool js_gfx_GFXFormatInfo_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXFormatInfo* cobj = JSB_ALLOC(cocos2d::GFXFormatInfo); + cc::GFXFormatInfo* cobj = JSB_ALLOC(cc::GFXFormatInfo); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -12303,8 +12303,8 @@ static bool js_gfx_GFXFormatInfo_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXFormatInfo* cobj = JSB_ALLOC(cocos2d::GFXFormatInfo); - cocos2d::String arg0; + cc::GFXFormatInfo* cobj = JSB_ALLOC(cc::GFXFormatInfo); + cc::String arg0; json->getProperty("name", &field); if(!field.isUndefined()) { arg0 = field.toStringForce().c_str(); @@ -12322,10 +12322,10 @@ static bool js_gfx_GFXFormatInfo_constructor(se::State& s) ok &= seval_to_uint32(field, (uint32_t*)&arg2); cobj->count = arg2; } - cocos2d::GFXFormatType arg3; + cc::GFXFormatType arg3; json->getProperty("type", &field); if(!field.isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cocos2d::GFXFormatType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg3 = (cc::GFXFormatType)tmp; } while(false); cobj->type = arg3; } bool arg4; @@ -12365,8 +12365,8 @@ static bool js_gfx_GFXFormatInfo_constructor(se::State& s) } else if(argc == 8) { - cocos2d::GFXFormatInfo* cobj = JSB_ALLOC(cocos2d::GFXFormatInfo); - cocos2d::String arg0; + cc::GFXFormatInfo* cobj = JSB_ALLOC(cc::GFXFormatInfo); + cc::String arg0; if (!args[0].isUndefined()) { arg0 = args[0].toStringForce().c_str(); cobj->name = arg0; @@ -12381,9 +12381,9 @@ static bool js_gfx_GFXFormatInfo_constructor(se::State& s) ok &= seval_to_uint32(args[2], (uint32_t*)&arg2); cobj->count = arg2; } - cocos2d::GFXFormatType arg3; + cc::GFXFormatType arg3; if (!args[3].isUndefined()) { - do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cocos2d::GFXFormatType)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[3], &tmp); arg3 = (cc::GFXFormatType)tmp; } while(false); cobj->type = arg3; } bool arg4; @@ -12421,24 +12421,24 @@ static bool js_gfx_GFXFormatInfo_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXFormatInfo_constructor, __jsb_cocos2d_GFXFormatInfo_class, js_cocos2d_GFXFormatInfo_finalize) +SE_BIND_CTOR(js_gfx_GFXFormatInfo_constructor, __jsb_cc_GFXFormatInfo_class, js_cc_GFXFormatInfo_finalize) -static bool js_cocos2d_GFXFormatInfo_finalize(se::State& s) +static bool js_cc_GFXFormatInfo_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXFormatInfo)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXFormatInfo)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXFormatInfo* cobj = (cocos2d::GFXFormatInfo*)s.nativeThisObject(); + cc::GFXFormatInfo* cobj = (cc::GFXFormatInfo*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXFormatInfo_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXFormatInfo_finalize) bool js_register_gfx_GFXFormatInfo(se::Object* obj) { @@ -12452,23 +12452,23 @@ bool js_register_gfx_GFXFormatInfo(se::Object* obj) cls->defineProperty("hasDepth", _SE(js_gfx_GFXFormatInfo_get_hasDepth), _SE(js_gfx_GFXFormatInfo_set_hasDepth)); cls->defineProperty("hasStencil", _SE(js_gfx_GFXFormatInfo_get_hasStencil), _SE(js_gfx_GFXFormatInfo_set_hasStencil)); cls->defineProperty("isCompressed", _SE(js_gfx_GFXFormatInfo_get_isCompressed), _SE(js_gfx_GFXFormatInfo_set_isCompressed)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXFormatInfo_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXFormatInfo_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXFormatInfo_proto = cls->getProto(); - __jsb_cocos2d_GFXFormatInfo_class = cls; + __jsb_cc_GFXFormatInfo_proto = cls->getProto(); + __jsb_cc_GFXFormatInfo_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXMemoryStatus_proto = nullptr; -se::Class* __jsb_cocos2d_GFXMemoryStatus_class = nullptr; +se::Object* __jsb_cc_GFXMemoryStatus_proto = nullptr; +se::Class* __jsb_cc_GFXMemoryStatus_class = nullptr; static bool js_gfx_GFXMemoryStatus_get_bufferSize(se::State& s) { - cocos2d::GFXMemoryStatus* cobj = (cocos2d::GFXMemoryStatus*)s.nativeThisObject(); + cc::GFXMemoryStatus* cobj = (cc::GFXMemoryStatus*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXMemoryStatus_get_bufferSize : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12482,7 +12482,7 @@ SE_BIND_PROP_GET(js_gfx_GFXMemoryStatus_get_bufferSize) static bool js_gfx_GFXMemoryStatus_set_bufferSize(se::State& s) { const auto& args = s.args(); - cocos2d::GFXMemoryStatus* cobj = (cocos2d::GFXMemoryStatus*)s.nativeThisObject(); + cc::GFXMemoryStatus* cobj = (cc::GFXMemoryStatus*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXMemoryStatus_set_bufferSize : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12496,7 +12496,7 @@ SE_BIND_PROP_SET(js_gfx_GFXMemoryStatus_set_bufferSize) static bool js_gfx_GFXMemoryStatus_get_textureSize(se::State& s) { - cocos2d::GFXMemoryStatus* cobj = (cocos2d::GFXMemoryStatus*)s.nativeThisObject(); + cc::GFXMemoryStatus* cobj = (cc::GFXMemoryStatus*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXMemoryStatus_get_textureSize : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12510,7 +12510,7 @@ SE_BIND_PROP_GET(js_gfx_GFXMemoryStatus_get_textureSize) static bool js_gfx_GFXMemoryStatus_set_textureSize(se::State& s) { const auto& args = s.args(); - cocos2d::GFXMemoryStatus* cobj = (cocos2d::GFXMemoryStatus*)s.nativeThisObject(); + cc::GFXMemoryStatus* cobj = (cc::GFXMemoryStatus*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXMemoryStatus_set_textureSize : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -12522,7 +12522,7 @@ static bool js_gfx_GFXMemoryStatus_set_textureSize(se::State& s) } SE_BIND_PROP_SET(js_gfx_GFXMemoryStatus_set_textureSize) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXMemoryStatus_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXMemoryStatus_finalize) static bool js_gfx_GFXMemoryStatus_constructor(se::State& s) { @@ -12532,7 +12532,7 @@ static bool js_gfx_GFXMemoryStatus_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXMemoryStatus* cobj = JSB_ALLOC(cocos2d::GFXMemoryStatus); + cc::GFXMemoryStatus* cobj = JSB_ALLOC(cc::GFXMemoryStatus); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -12542,7 +12542,7 @@ static bool js_gfx_GFXMemoryStatus_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXMemoryStatus* cobj = JSB_ALLOC(cocos2d::GFXMemoryStatus); + cc::GFXMemoryStatus* cobj = JSB_ALLOC(cc::GFXMemoryStatus); unsigned int arg0 = 0; json->getProperty("bufferSize", &field); if(!field.isUndefined()) { @@ -12568,7 +12568,7 @@ static bool js_gfx_GFXMemoryStatus_constructor(se::State& s) } else if(argc == 2) { - cocos2d::GFXMemoryStatus* cobj = JSB_ALLOC(cocos2d::GFXMemoryStatus); + cc::GFXMemoryStatus* cobj = JSB_ALLOC(cc::GFXMemoryStatus); unsigned int arg0 = 0; if (!args[0].isUndefined()) { ok &= seval_to_uint32(args[0], (uint32_t*)&arg0); @@ -12594,24 +12594,24 @@ static bool js_gfx_GFXMemoryStatus_constructor(se::State& s) SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc); return false; } -SE_BIND_CTOR(js_gfx_GFXMemoryStatus_constructor, __jsb_cocos2d_GFXMemoryStatus_class, js_cocos2d_GFXMemoryStatus_finalize) +SE_BIND_CTOR(js_gfx_GFXMemoryStatus_constructor, __jsb_cc_GFXMemoryStatus_class, js_cc_GFXMemoryStatus_finalize) -static bool js_cocos2d_GFXMemoryStatus_finalize(se::State& s) +static bool js_cc_GFXMemoryStatus_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXMemoryStatus)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXMemoryStatus)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXMemoryStatus* cobj = (cocos2d::GFXMemoryStatus*)s.nativeThisObject(); + cc::GFXMemoryStatus* cobj = (cc::GFXMemoryStatus*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXMemoryStatus_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXMemoryStatus_finalize) bool js_register_gfx_GFXMemoryStatus(se::Object* obj) { @@ -12619,23 +12619,23 @@ bool js_register_gfx_GFXMemoryStatus(se::Object* obj) cls->defineProperty("bufferSize", _SE(js_gfx_GFXMemoryStatus_get_bufferSize), _SE(js_gfx_GFXMemoryStatus_set_bufferSize)); cls->defineProperty("textureSize", _SE(js_gfx_GFXMemoryStatus_get_textureSize), _SE(js_gfx_GFXMemoryStatus_set_textureSize)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXMemoryStatus_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXMemoryStatus_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXMemoryStatus_proto = cls->getProto(); - __jsb_cocos2d_GFXMemoryStatus_class = cls; + __jsb_cc_GFXMemoryStatus_proto = cls->getProto(); + __jsb_cc_GFXMemoryStatus_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXObject_proto = nullptr; -se::Class* __jsb_cocos2d_GFXObject_class = nullptr; +se::Object* __jsb_cc_GFXObject_proto = nullptr; +se::Class* __jsb_cc_GFXObject_class = nullptr; static bool js_gfx_GFXObject_getType(se::State& s) { - cocos2d::GFXObject* cobj = (cocos2d::GFXObject*)s.nativeThisObject(); + cc::GFXObject* cobj = (cc::GFXObject*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXObject_getType : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12653,7 +12653,7 @@ SE_BIND_PROP_GET(js_gfx_GFXObject_getType) static bool js_gfx_GFXObject_getStatus(se::State& s) { - cocos2d::GFXObject* cobj = (cocos2d::GFXObject*)s.nativeThisObject(); + cc::GFXObject* cobj = (cc::GFXObject*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXObject_getStatus : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12669,38 +12669,38 @@ static bool js_gfx_GFXObject_getStatus(se::State& s) } SE_BIND_PROP_GET(js_gfx_GFXObject_getStatus) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXObject_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXObject_finalize) static bool js_gfx_GFXObject_constructor(se::State& s) { CC_UNUSED bool ok = true; const auto& args = s.args(); - cocos2d::GFXObjectType arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXObjectType)tmp; } while(false); + cc::GFXObjectType arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXObjectType)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXObject_constructor : Error processing arguments"); - cocos2d::GFXObject* cobj = JSB_ALLOC(cocos2d::GFXObject, arg0); + cc::GFXObject* cobj = JSB_ALLOC(cc::GFXObject, arg0); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } -SE_BIND_CTOR(js_gfx_GFXObject_constructor, __jsb_cocos2d_GFXObject_class, js_cocos2d_GFXObject_finalize) +SE_BIND_CTOR(js_gfx_GFXObject_constructor, __jsb_cc_GFXObject_class, js_cc_GFXObject_finalize) -static bool js_cocos2d_GFXObject_finalize(se::State& s) +static bool js_cc_GFXObject_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXObject)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXObject)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXObject* cobj = (cocos2d::GFXObject*)s.nativeThisObject(); + cc::GFXObject* cobj = (cc::GFXObject*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXObject_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXObject_finalize) bool js_register_gfx_GFXObject(se::Object* obj) { @@ -12708,23 +12708,23 @@ bool js_register_gfx_GFXObject(se::Object* obj) cls->defineProperty("status", _SE(js_gfx_GFXObject_getStatus), nullptr); cls->defineProperty("gfxType", _SE(js_gfx_GFXObject_getType), nullptr); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXObject_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXObject_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXObject_proto = cls->getProto(); - __jsb_cocos2d_GFXObject_class = cls; + __jsb_cc_GFXObject_proto = cls->getProto(); + __jsb_cc_GFXObject_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXDevice_proto = nullptr; -se::Class* __jsb_cocos2d_GFXDevice_class = nullptr; +se::Object* __jsb_cc_GFXDevice_proto = nullptr; +se::Class* __jsb_cc_GFXDevice_class = nullptr; static bool js_gfx_GFXDevice_getMaxUniformBlockSize(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxUniformBlockSize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12742,7 +12742,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxUniformBlockSize) static bool js_gfx_GFXDevice_getMaxVertexTextureUnits(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxVertexTextureUnits : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12760,7 +12760,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxVertexTextureUnits) static bool js_gfx_GFXDevice_getProjectionSignY(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getProjectionSignY : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12778,7 +12778,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getProjectionSignY) static bool js_gfx_GFXDevice_getMaxVertexUniformVectors(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxVertexUniformVectors : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12796,7 +12796,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxVertexUniformVectors) static bool js_gfx_GFXDevice_getGfxAPI(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getGfxAPI : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12814,13 +12814,13 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getGfxAPI) static bool js_gfx_GFXDevice_getVendor(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getVendor : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::String& result = cobj->getVendor(); + const cc::String& result = cobj->getVendor(); s.rval().setString(result); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_getVendor : Error processing arguments"); return true; @@ -12832,14 +12832,14 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getVendor) static bool js_gfx_GFXDevice_hasFeature(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_hasFeature : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXFeature arg0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXFeature)tmp; } while(false); + cc::GFXFeature arg0; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXFeature)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_hasFeature : Error processing arguments"); bool result = cobj->hasFeature(arg0); ok &= boolean_to_seval(result, &s.rval()); @@ -12853,16 +12853,16 @@ SE_BIND_FUNC(js_gfx_GFXDevice_hasFeature) static bool js_gfx_GFXDevice_createFence(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createFence : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXFenceInfo* arg0 = nullptr; + cc::GFXFenceInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createFence : Error processing arguments"); - cocos2d::GFXFence* result = cobj->createFence(*arg0); + cc::GFXFence* result = cobj->createFence(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createFence : Error processing arguments"); return true; @@ -12874,13 +12874,13 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createFence) static bool js_gfx_GFXDevice_getContext(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getContext : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXContext* result = cobj->getContext(); + cc::GFXContext* result = cobj->getContext(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_getContext : Error processing arguments"); return true; @@ -12892,7 +12892,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getContext) static bool js_gfx_GFXDevice_getWidth(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getWidth : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12910,7 +12910,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getWidth) static bool js_gfx_GFXDevice_setReverseCW(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_setReverseCW : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12929,16 +12929,16 @@ SE_BIND_PROP_SET(js_gfx_GFXDevice_setReverseCW) static bool js_gfx_GFXDevice_createCommandAllocator(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createCommandAllocator : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXCommandAllocatorInfo* arg0 = nullptr; + cc::GFXCommandAllocatorInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createCommandAllocator : Error processing arguments"); - cocos2d::GFXCommandAllocator* result = cobj->createCommandAllocator(*arg0); + cc::GFXCommandAllocator* result = cobj->createCommandAllocator(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createCommandAllocator : Error processing arguments"); return true; @@ -12950,13 +12950,13 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createCommandAllocator) static bool js_gfx_GFXDevice_getQueue(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getQueue : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXQueue* result = cobj->getQueue(); + cc::GFXQueue* result = cobj->getQueue(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_getQueue : Error processing arguments"); return true; @@ -12968,7 +12968,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getQueue) static bool js_gfx_GFXDevice_getMaxVertexAttributes(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxVertexAttributes : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -12986,7 +12986,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxVertexAttributes) static bool js_gfx_GFXDevice_getDepthStencilFormat(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getDepthStencilFormat : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13004,7 +13004,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getDepthStencilFormat) static bool js_gfx_GFXDevice_getNumTris(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getNumTris : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13022,13 +13022,13 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getNumTris) static bool js_gfx_GFXDevice_getRenderer(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getRenderer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::String& result = cobj->getRenderer(); + const cc::String& result = cobj->getRenderer(); s.rval().setString(result); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_getRenderer : Error processing arguments"); return true; @@ -13040,7 +13040,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getRenderer) static bool js_gfx_GFXDevice_getStencilBits(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getStencilBits : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13058,13 +13058,13 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getStencilBits) static bool js_gfx_GFXDevice_getDeviceName(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getDeviceName : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::String& result = cobj->getDeviceName(); + const cc::String& result = cobj->getDeviceName(); s.rval().setString(result); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_getDeviceName : Error processing arguments"); return true; @@ -13076,7 +13076,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getDeviceName) static bool js_gfx_GFXDevice_getNumInstances(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getNumInstances : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13094,7 +13094,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getNumInstances) static bool js_gfx_GFXDevice_getHeight(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getHeight : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13112,7 +13112,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getHeight) static bool js_gfx_GFXDevice_getMaxFragmentUniformVectors(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxFragmentUniformVectors : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13130,16 +13130,16 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxFragmentUniformVectors) static bool js_gfx_GFXDevice_createPipelineState(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createPipelineState : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXPipelineStateInfo* arg0 = nullptr; + cc::GFXPipelineStateInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createPipelineState : Error processing arguments"); - cocos2d::GFXPipelineState* result = cobj->createPipelineState(*arg0); + cc::GFXPipelineState* result = cobj->createPipelineState(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createPipelineState : Error processing arguments"); return true; @@ -13151,16 +13151,16 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createPipelineState) static bool js_gfx_GFXDevice_createCommandBuffer(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createCommandBuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXCommandBufferInfo* arg0 = nullptr; + cc::GFXCommandBufferInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createCommandBuffer : Error processing arguments"); - cocos2d::GFXCommandBuffer* result = cobj->createCommandBuffer(*arg0); + cc::GFXCommandBuffer* result = cobj->createCommandBuffer(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createCommandBuffer : Error processing arguments"); return true; @@ -13172,7 +13172,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createCommandBuffer) static bool js_gfx_GFXDevice_present(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_present : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13187,7 +13187,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_present) static bool js_gfx_GFXDevice_destroy(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13202,7 +13202,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_destroy) static bool js_gfx_GFXDevice_getColorFormat(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getColorFormat : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13220,16 +13220,16 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getColorFormat) static bool js_gfx_GFXDevice_createFramebuffer(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createFramebuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXFramebufferInfo* arg0 = nullptr; + cc::GFXFramebufferInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createFramebuffer : Error processing arguments"); - cocos2d::GFXFramebuffer* result = cobj->createFramebuffer(*arg0); + cc::GFXFramebuffer* result = cobj->createFramebuffer(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createFramebuffer : Error processing arguments"); return true; @@ -13241,7 +13241,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createFramebuffer) static bool js_gfx_GFXDevice_getMaxTextureSize(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxTextureSize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13259,16 +13259,16 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxTextureSize) static bool js_gfx_GFXDevice_createRenderPass(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createRenderPass : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXRenderPassInfo* arg0 = nullptr; + cc::GFXRenderPassInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createRenderPass : Error processing arguments"); - cocos2d::GFXRenderPass* result = cobj->createRenderPass(*arg0); + cc::GFXRenderPass* result = cobj->createRenderPass(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createRenderPass : Error processing arguments"); return true; @@ -13280,16 +13280,16 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createRenderPass) static bool js_gfx_GFXDevice_createPipelineLayout(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createPipelineLayout : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXPipelineLayoutInfo* arg0 = nullptr; + cc::GFXPipelineLayoutInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createPipelineLayout : Error processing arguments"); - cocos2d::GFXPipelineLayout* result = cobj->createPipelineLayout(*arg0); + cc::GFXPipelineLayout* result = cobj->createPipelineLayout(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createPipelineLayout : Error processing arguments"); return true; @@ -13301,7 +13301,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createPipelineLayout) static bool js_gfx_GFXDevice_acquire(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_acquire : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13316,7 +13316,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_acquire) static bool js_gfx_GFXDevice_getMaxCubeMapTextureSize(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxCubeMapTextureSize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13334,7 +13334,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxCubeMapTextureSize) static bool js_gfx_GFXDevice_getShaderIdGen(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getShaderIdGen : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13352,7 +13352,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getShaderIdGen) static bool js_gfx_GFXDevice_getMaxUniformBufferBindings(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxUniformBufferBindings : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13370,16 +13370,16 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxUniformBufferBindings) static bool js_gfx_GFXDevice_createShader(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createShader : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXShaderInfo* arg0 = nullptr; + cc::GFXShaderInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createShader : Error processing arguments"); - cocos2d::GFXShader* result = cobj->createShader(*arg0); + cc::GFXShader* result = cobj->createShader(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createShader : Error processing arguments"); return true; @@ -13391,16 +13391,16 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createShader) static bool js_gfx_GFXDevice_createInputAssembler(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createInputAssembler : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXInputAssemblerInfo* arg0 = nullptr; + cc::GFXInputAssemblerInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createInputAssembler : Error processing arguments"); - cocos2d::GFXInputAssembler* result = cobj->createInputAssembler(*arg0); + cc::GFXInputAssembler* result = cobj->createInputAssembler(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createInputAssembler : Error processing arguments"); return true; @@ -13412,14 +13412,14 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createInputAssembler) static bool js_gfx_GFXDevice_defineMacro(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_defineMacro : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { - cocos2d::String arg0; - cocos2d::String arg1; + cc::String arg0; + cc::String arg1; arg0 = args[0].toStringForce().c_str(); arg1 = args[1].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_defineMacro : Error processing arguments"); @@ -13433,16 +13433,16 @@ SE_BIND_FUNC(js_gfx_GFXDevice_defineMacro) static bool js_gfx_GFXDevice_createSampler(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createSampler : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXSamplerInfo* arg0 = nullptr; + cc::GFXSamplerInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createSampler : Error processing arguments"); - cocos2d::GFXSampler* result = cobj->createSampler(*arg0); + cc::GFXSampler* result = cobj->createSampler(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createSampler : Error processing arguments"); return true; @@ -13454,16 +13454,16 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createSampler) static bool js_gfx_GFXDevice_createBuffer(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createBuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXBufferInfo* arg0 = nullptr; + cc::GFXBufferInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createBuffer : Error processing arguments"); - cocos2d::GFXBuffer* result = cobj->createBuffer(*arg0); + cc::GFXBuffer* result = cobj->createBuffer(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createBuffer : Error processing arguments"); return true; @@ -13475,7 +13475,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createBuffer) static bool js_gfx_GFXDevice_getNativeHeight(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getNativeHeight : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13493,13 +13493,13 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getNativeHeight) static bool js_gfx_GFXDevice_initialize(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXDeviceInfo* arg0 = nullptr; + cc::GFXDeviceInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -13514,7 +13514,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_initialize) static bool js_gfx_GFXDevice_resize(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_resize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13535,16 +13535,16 @@ SE_BIND_FUNC(js_gfx_GFXDevice_resize) static bool js_gfx_GFXDevice_createQueue(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createQueue : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXQueueInfo* arg0 = nullptr; + cc::GFXQueueInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createQueue : Error processing arguments"); - cocos2d::GFXQueue* result = cobj->createQueue(*arg0); + cc::GFXQueue* result = cobj->createQueue(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createQueue : Error processing arguments"); return true; @@ -13556,7 +13556,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createQueue) static bool js_gfx_GFXDevice_getDepthBits(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getDepthBits : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13574,7 +13574,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getDepthBits) static bool js_gfx_GFXDevice_getMinClipZ(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMinClipZ : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13592,13 +13592,13 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMinClipZ) static bool js_gfx_GFXDevice_getMemoryStatus(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMemoryStatus : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXMemoryStatus& result = cobj->getMemoryStatus(); + cc::GFXMemoryStatus& result = cobj->getMemoryStatus(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_getMemoryStatus : Error processing arguments"); return true; @@ -13610,7 +13610,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMemoryStatus) static bool js_gfx_GFXDevice_getMaxTextureUnits(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getMaxTextureUnits : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13628,7 +13628,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getMaxTextureUnits) static bool js_gfx_GFXDevice_getReverseCW(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getReverseCW : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13646,13 +13646,13 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getReverseCW) static bool js_gfx_GFXDevice_getCommandAllocator(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getCommandAllocator : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXCommandAllocator* result = cobj->getCommandAllocator(); + cc::GFXCommandAllocator* result = cobj->getCommandAllocator(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_getCommandAllocator : Error processing arguments"); return true; @@ -13664,7 +13664,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getCommandAllocator) static bool js_gfx_GFXDevice_getNumDrawCalls(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getNumDrawCalls : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13682,7 +13682,7 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getNumDrawCalls) static bool js_gfx_GFXDevice_getNativeWidth(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_getNativeWidth : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13700,16 +13700,16 @@ SE_BIND_PROP_GET(js_gfx_GFXDevice_getNativeWidth) static bool js_gfx_GFXDevice_createBindingLayout(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXDevice_createBindingLayout : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXBindingLayoutInfo* arg0 = nullptr; + cc::GFXBindingLayoutInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createBindingLayout : Error processing arguments"); - cocos2d::GFXBindingLayout* result = cobj->createBindingLayout(*arg0); + cc::GFXBindingLayout* result = cobj->createBindingLayout(*arg0); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXDevice_createBindingLayout : Error processing arguments"); return true; @@ -13779,21 +13779,21 @@ bool js_register_gfx_GFXDevice(se::Object* obj) cls->defineFunction("createQueue", _SE(js_gfx_GFXDevice_createQueue)); cls->defineFunction("createBindingLayout", _SE(js_gfx_GFXDevice_createBindingLayout)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXDevice_proto = cls->getProto(); - __jsb_cocos2d_GFXDevice_class = cls; + __jsb_cc_GFXDevice_proto = cls->getProto(); + __jsb_cc_GFXDevice_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBuffer_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBuffer_class = nullptr; +se::Object* __jsb_cc_GFXBuffer_proto = nullptr; +se::Class* __jsb_cc_GFXBuffer_class = nullptr; static bool js_gfx_GFXBuffer_getBufferView(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_getBufferView : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13811,7 +13811,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBuffer_getBufferView) static bool js_gfx_GFXBuffer_getUsage(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_getUsage : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13829,7 +13829,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBuffer_getUsage) static bool js_gfx_GFXBuffer_getMemUsage(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_getMemUsage : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13847,7 +13847,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBuffer_getMemUsage) static bool js_gfx_GFXBuffer_getSize(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_getSize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13865,7 +13865,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBuffer_getSize) static bool js_gfx_GFXBuffer_getCount(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_getCount : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13883,13 +13883,13 @@ SE_BIND_PROP_GET(js_gfx_GFXBuffer_getCount) static bool js_gfx_GFXBuffer_initialize(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXBufferInfo* arg0 = nullptr; + cc::GFXBufferInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBuffer_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -13904,7 +13904,7 @@ SE_BIND_FUNC(js_gfx_GFXBuffer_initialize) static bool js_gfx_GFXBuffer_destroy(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13919,7 +13919,7 @@ SE_BIND_FUNC(js_gfx_GFXBuffer_destroy) static bool js_gfx_GFXBuffer_getStride(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_getStride : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13937,13 +13937,13 @@ SE_BIND_PROP_GET(js_gfx_GFXBuffer_getStride) static bool js_gfx_GFXBuffer_getDevice(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXBuffer_getDevice : Error processing arguments"); return true; @@ -13955,7 +13955,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBuffer_getDevice) static bool js_gfx_GFXBuffer_getFlags(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_getFlags : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13973,7 +13973,7 @@ SE_BIND_PROP_GET(js_gfx_GFXBuffer_getFlags) static bool js_gfx_GFXBuffer_resize(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_resize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -13990,37 +13990,37 @@ static bool js_gfx_GFXBuffer_resize(se::State& s) } SE_BIND_FUNC(js_gfx_GFXBuffer_resize) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBuffer_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBuffer_finalize) static bool js_gfx_GFXBuffer_constructor(se::State& s) { - //#3 cocos2d::GFXBuffer: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXBuffer constructor is skipped\")"); + //#3 cc::GFXBuffer: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXBuffer constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXBuffer_constructor, __jsb_cocos2d_GFXBuffer_class, js_cocos2d_GFXBuffer_finalize) +SE_BIND_CTOR(js_gfx_GFXBuffer_constructor, __jsb_cc_GFXBuffer_class, js_cc_GFXBuffer_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXBuffer_finalize(se::State& s) +static bool js_cc_GFXBuffer_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBuffer)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBuffer)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBuffer_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBuffer_finalize) bool js_register_gfx_GFXBuffer(se::Object* obj) { - auto cls = se::Class::create("GFXBuffer", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXBuffer_constructor)); + auto cls = se::Class::create("GFXBuffer", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXBuffer_constructor)); cls->defineProperty("count", _SE(js_gfx_GFXBuffer_getCount), nullptr); cls->defineProperty("memUsage", _SE(js_gfx_GFXBuffer_getMemUsage), nullptr); @@ -14033,23 +14033,23 @@ bool js_register_gfx_GFXBuffer(se::Object* obj) cls->defineFunction("initialize", _SE(js_gfx_GFXBuffer_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXBuffer_destroy)); cls->defineFunction("resize", _SE(js_gfx_GFXBuffer_resize)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBuffer_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBuffer_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBuffer_proto = cls->getProto(); - __jsb_cocos2d_GFXBuffer_class = cls; + __jsb_cc_GFXBuffer_proto = cls->getProto(); + __jsb_cc_GFXBuffer_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXTexture_proto = nullptr; -se::Class* __jsb_cocos2d_GFXTexture_class = nullptr; +se::Object* __jsb_cc_GFXTexture_proto = nullptr; +se::Class* __jsb_cc_GFXTexture_class = nullptr; static bool js_gfx_GFXTexture_getSize(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getSize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14067,7 +14067,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getSize) static bool js_gfx_GFXTexture_getDepth(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getDepth : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14085,7 +14085,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getDepth) static bool js_gfx_GFXTexture_getType(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getType : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14103,7 +14103,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getType) static bool js_gfx_GFXTexture_getHeight(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getHeight : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14121,7 +14121,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getHeight) static bool js_gfx_GFXTexture_getBuffer(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getBuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14139,7 +14139,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getBuffer) static bool js_gfx_GFXTexture_getWidth(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getWidth : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14157,7 +14157,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getWidth) static bool js_gfx_GFXTexture_getMipLevel(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getMipLevel : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14175,7 +14175,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getMipLevel) static bool js_gfx_GFXTexture_getArrayLayer(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getArrayLayer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14193,7 +14193,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getArrayLayer) static bool js_gfx_GFXTexture_getUsage(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getUsage : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14211,7 +14211,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getUsage) static bool js_gfx_GFXTexture_destroy(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14226,7 +14226,7 @@ SE_BIND_FUNC(js_gfx_GFXTexture_destroy) static bool js_gfx_GFXTexture_getSamples(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getSamples : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14244,7 +14244,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getSamples) static bool js_gfx_GFXTexture_getFormat(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getFormat : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14262,7 +14262,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getFormat) static bool js_gfx_GFXTexture_getFlags(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_getFlags : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14280,7 +14280,7 @@ SE_BIND_PROP_GET(js_gfx_GFXTexture_getFlags) static bool js_gfx_GFXTexture_resize(se::State& s) { - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXTexture_resize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14299,37 +14299,37 @@ static bool js_gfx_GFXTexture_resize(se::State& s) } SE_BIND_FUNC(js_gfx_GFXTexture_resize) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXTexture_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXTexture_finalize) static bool js_gfx_GFXTexture_constructor(se::State& s) { - //#3 cocos2d::GFXTexture: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXTexture constructor is skipped\")"); + //#3 cc::GFXTexture: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXTexture constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXTexture_constructor, __jsb_cocos2d_GFXTexture_class, js_cocos2d_GFXTexture_finalize) +SE_BIND_CTOR(js_gfx_GFXTexture_constructor, __jsb_cc_GFXTexture_class, js_cc_GFXTexture_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXTexture_finalize(se::State& s) +static bool js_cc_GFXTexture_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXTexture)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXTexture)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXTexture_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXTexture_finalize) bool js_register_gfx_GFXTexture(se::Object* obj) { - auto cls = se::Class::create("GFXTexture", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXTexture_constructor)); + auto cls = se::Class::create("GFXTexture", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXTexture_constructor)); cls->defineProperty("arrayLayer", _SE(js_gfx_GFXTexture_getArrayLayer), nullptr); cls->defineProperty("format", _SE(js_gfx_GFXTexture_getFormat), nullptr); @@ -14345,23 +14345,23 @@ bool js_register_gfx_GFXTexture(se::Object* obj) cls->defineProperty("size", _SE(js_gfx_GFXTexture_getSize), nullptr); cls->defineFunction("destroy", _SE(js_gfx_GFXTexture_destroy)); cls->defineFunction("resize", _SE(js_gfx_GFXTexture_resize)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXTexture_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXTexture_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXTexture_proto = cls->getProto(); - __jsb_cocos2d_GFXTexture_class = cls; + __jsb_cc_GFXTexture_proto = cls->getProto(); + __jsb_cc_GFXTexture_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXSampler_proto = nullptr; -se::Class* __jsb_cocos2d_GFXSampler_class = nullptr; +se::Object* __jsb_cc_GFXSampler_proto = nullptr; +se::Class* __jsb_cc_GFXSampler_class = nullptr; static bool js_gfx_GFXSampler_getAddressW(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getAddressW : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14379,7 +14379,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getAddressW) static bool js_gfx_GFXSampler_getMaxAnisotropy(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getMaxAnisotropy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14397,7 +14397,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getMaxAnisotropy) static bool js_gfx_GFXSampler_getMipLODBias(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getMipLODBias : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14415,7 +14415,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getMipLODBias) static bool js_gfx_GFXSampler_getCmpFunc(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getCmpFunc : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14433,13 +14433,13 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getCmpFunc) static bool js_gfx_GFXSampler_getBorderColor(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getBorderColor : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::GFXColor& result = cobj->getBorderColor(); + const cc::GFXColor& result = cobj->getBorderColor(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXSampler_getBorderColor : Error processing arguments"); return true; @@ -14451,13 +14451,13 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getBorderColor) static bool js_gfx_GFXSampler_getName(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getName : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::String& result = cobj->getName(); + const cc::String& result = cobj->getName(); s.rval().setString(result); SE_PRECONDITION2(ok, false, "js_gfx_GFXSampler_getName : Error processing arguments"); return true; @@ -14469,7 +14469,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getName) static bool js_gfx_GFXSampler_getMipFilter(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getMipFilter : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14487,7 +14487,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getMipFilter) static bool js_gfx_GFXSampler_getAddressV(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getAddressV : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14505,7 +14505,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getAddressV) static bool js_gfx_GFXSampler_getAddressU(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getAddressU : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14523,7 +14523,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getAddressU) static bool js_gfx_GFXSampler_getMagFilter(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getMagFilter : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14541,13 +14541,13 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getMagFilter) static bool js_gfx_GFXSampler_initialize(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXSamplerInfo* arg0 = nullptr; + cc::GFXSamplerInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXSampler_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -14562,7 +14562,7 @@ SE_BIND_FUNC(js_gfx_GFXSampler_initialize) static bool js_gfx_GFXSampler_destroy(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14577,13 +14577,13 @@ SE_BIND_FUNC(js_gfx_GFXSampler_destroy) static bool js_gfx_GFXSampler_getDevice(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXSampler_getDevice : Error processing arguments"); return true; @@ -14595,7 +14595,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getDevice) static bool js_gfx_GFXSampler_getMinLOD(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getMinLOD : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14613,7 +14613,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getMinLOD) static bool js_gfx_GFXSampler_getMinFilter(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getMinFilter : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14631,7 +14631,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSampler_getMinFilter) static bool js_gfx_GFXSampler_getMaxLOD(se::State& s) { - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSampler_getMaxLOD : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14647,37 +14647,37 @@ static bool js_gfx_GFXSampler_getMaxLOD(se::State& s) } SE_BIND_PROP_GET(js_gfx_GFXSampler_getMaxLOD) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXSampler_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXSampler_finalize) static bool js_gfx_GFXSampler_constructor(se::State& s) { - //#3 cocos2d::GFXSampler: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXSampler constructor is skipped\")"); + //#3 cc::GFXSampler: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXSampler constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXSampler_constructor, __jsb_cocos2d_GFXSampler_class, js_cocos2d_GFXSampler_finalize) +SE_BIND_CTOR(js_gfx_GFXSampler_constructor, __jsb_cc_GFXSampler_class, js_cc_GFXSampler_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXSampler_finalize(se::State& s) +static bool js_cc_GFXSampler_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXSampler)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXSampler)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXSampler* cobj = (cocos2d::GFXSampler*)s.nativeThisObject(); + cc::GFXSampler* cobj = (cc::GFXSampler*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXSampler_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXSampler_finalize) bool js_register_gfx_GFXSampler(se::Object* obj) { - auto cls = se::Class::create("GFXSampler", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXSampler_constructor)); + auto cls = se::Class::create("GFXSampler", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXSampler_constructor)); cls->defineProperty("borderColor", _SE(js_gfx_GFXSampler_getBorderColor), nullptr); cls->defineProperty("mipFilter", _SE(js_gfx_GFXSampler_getMipFilter), nullptr); @@ -14695,29 +14695,29 @@ bool js_register_gfx_GFXSampler(se::Object* obj) cls->defineProperty("minLOD", _SE(js_gfx_GFXSampler_getMinLOD), nullptr); cls->defineFunction("initialize", _SE(js_gfx_GFXSampler_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXSampler_destroy)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXSampler_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXSampler_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXSampler_proto = cls->getProto(); - __jsb_cocos2d_GFXSampler_class = cls; + __jsb_cc_GFXSampler_proto = cls->getProto(); + __jsb_cc_GFXSampler_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXShader_proto = nullptr; -se::Class* __jsb_cocos2d_GFXShader_class = nullptr; +se::Object* __jsb_cc_GFXShader_proto = nullptr; +se::Class* __jsb_cc_GFXShader_class = nullptr; static bool js_gfx_GFXShader_getStages(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_getStages : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getStages(); + const std::vector& result = cobj->getStages(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXShader_getStages : Error processing arguments"); return true; @@ -14729,13 +14729,13 @@ SE_BIND_PROP_GET(js_gfx_GFXShader_getStages) static bool js_gfx_GFXShader_getName(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_getName : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::String& result = cobj->getName(); + const cc::String& result = cobj->getName(); s.rval().setString(result); SE_PRECONDITION2(ok, false, "js_gfx_GFXShader_getName : Error processing arguments"); return true; @@ -14747,13 +14747,13 @@ SE_BIND_PROP_GET(js_gfx_GFXShader_getName) static bool js_gfx_GFXShader_getAttributes(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_getAttributes : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getAttributes(); + const std::vector& result = cobj->getAttributes(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXShader_getAttributes : Error processing arguments"); return true; @@ -14765,7 +14765,7 @@ SE_BIND_PROP_GET(js_gfx_GFXShader_getAttributes) static bool js_gfx_GFXShader_getHash(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_getHash : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14783,13 +14783,13 @@ SE_BIND_PROP_GET(js_gfx_GFXShader_getHash) static bool js_gfx_GFXShader_getSamplers(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_getSamplers : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getSamplers(); + const std::vector& result = cobj->getSamplers(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXShader_getSamplers : Error processing arguments"); return true; @@ -14801,13 +14801,13 @@ SE_BIND_PROP_GET(js_gfx_GFXShader_getSamplers) static bool js_gfx_GFXShader_initialize(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXShaderInfo* arg0 = nullptr; + cc::GFXShaderInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXShader_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -14822,7 +14822,7 @@ SE_BIND_FUNC(js_gfx_GFXShader_initialize) static bool js_gfx_GFXShader_destroy(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14837,13 +14837,13 @@ SE_BIND_FUNC(js_gfx_GFXShader_destroy) static bool js_gfx_GFXShader_getDevice(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXShader_getDevice : Error processing arguments"); return true; @@ -14855,13 +14855,13 @@ SE_BIND_PROP_GET(js_gfx_GFXShader_getDevice) static bool js_gfx_GFXShader_getBlocks(se::State& s) { - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXShader_getBlocks : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getBlocks(); + const std::vector& result = cobj->getBlocks(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXShader_getBlocks : Error processing arguments"); return true; @@ -14871,37 +14871,37 @@ static bool js_gfx_GFXShader_getBlocks(se::State& s) } SE_BIND_PROP_GET(js_gfx_GFXShader_getBlocks) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXShader_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXShader_finalize) static bool js_gfx_GFXShader_constructor(se::State& s) { - //#3 cocos2d::GFXShader: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXShader constructor is skipped\")"); + //#3 cc::GFXShader: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXShader constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXShader_constructor, __jsb_cocos2d_GFXShader_class, js_cocos2d_GFXShader_finalize) +SE_BIND_CTOR(js_gfx_GFXShader_constructor, __jsb_cc_GFXShader_class, js_cc_GFXShader_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXShader_finalize(se::State& s) +static bool js_cc_GFXShader_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXShader)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXShader)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXShader* cobj = (cocos2d::GFXShader*)s.nativeThisObject(); + cc::GFXShader* cobj = (cc::GFXShader*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXShader_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXShader_finalize) bool js_register_gfx_GFXShader(se::Object* obj) { - auto cls = se::Class::create("GFXShader", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXShader_constructor)); + auto cls = se::Class::create("GFXShader", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXShader_constructor)); cls->defineProperty("blocks", _SE(js_gfx_GFXShader_getBlocks), nullptr); cls->defineProperty("name", _SE(js_gfx_GFXShader_getName), nullptr); @@ -14912,23 +14912,23 @@ bool js_register_gfx_GFXShader(se::Object* obj) cls->defineProperty("hash", _SE(js_gfx_GFXShader_getHash), nullptr); cls->defineFunction("initialize", _SE(js_gfx_GFXShader_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXShader_destroy)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXShader_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXShader_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXShader_proto = cls->getProto(); - __jsb_cocos2d_GFXShader_class = cls; + __jsb_cc_GFXShader_proto = cls->getProto(); + __jsb_cc_GFXShader_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXInputAssembler_proto = nullptr; -se::Class* __jsb_cocos2d_GFXInputAssembler_class = nullptr; +se::Object* __jsb_cc_GFXInputAssembler_proto = nullptr; +se::Class* __jsb_cc_GFXInputAssembler_class = nullptr; static bool js_gfx_GFXInputAssembler_getFirstIndex(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getFirstIndex : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14946,7 +14946,7 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getFirstIndex) static bool js_gfx_GFXInputAssembler_getVertexOffset(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getVertexOffset : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14964,7 +14964,7 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getVertexOffset) static bool js_gfx_GFXInputAssembler_getVertexCount(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getVertexCount : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -14982,7 +14982,7 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getVertexCount) static bool js_gfx_GFXInputAssembler_setIndexCount(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_setIndexCount : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15001,7 +15001,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssembler_setIndexCount) static bool js_gfx_GFXInputAssembler_getAttributesHash(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getAttributesHash : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15019,7 +15019,7 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getAttributesHash) static bool js_gfx_GFXInputAssembler_setFirstInstance(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_setFirstInstance : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15038,7 +15038,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssembler_setFirstInstance) static bool js_gfx_GFXInputAssembler_destroy(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15053,13 +15053,13 @@ SE_BIND_FUNC(js_gfx_GFXInputAssembler_destroy) static bool js_gfx_GFXInputAssembler_getDevice(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssembler_getDevice : Error processing arguments"); return true; @@ -15071,7 +15071,7 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getDevice) static bool js_gfx_GFXInputAssembler_setVertexOffset(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_setVertexOffset : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15090,7 +15090,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssembler_setVertexOffset) static bool js_gfx_GFXInputAssembler_getInstanceCount(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getInstanceCount : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15108,7 +15108,7 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getInstanceCount) static bool js_gfx_GFXInputAssembler_getIndexCount(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getIndexCount : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15126,13 +15126,13 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getIndexCount) static bool js_gfx_GFXInputAssembler_getIndirectBuffer(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getIndirectBuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXBuffer* result = cobj->getIndirectBuffer(); + cc::GFXBuffer* result = cobj->getIndirectBuffer(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssembler_getIndirectBuffer : Error processing arguments"); return true; @@ -15144,13 +15144,13 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getIndirectBuffer) static bool js_gfx_GFXInputAssembler_getVertexBuffers(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getVertexBuffers : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getVertexBuffers(); + const std::vector& result = cobj->getVertexBuffers(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssembler_getVertexBuffers : Error processing arguments"); return true; @@ -15162,13 +15162,13 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getVertexBuffers) static bool js_gfx_GFXInputAssembler_initialize(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXInputAssemblerInfo* arg0 = nullptr; + cc::GFXInputAssemblerInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssembler_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -15183,7 +15183,7 @@ SE_BIND_FUNC(js_gfx_GFXInputAssembler_initialize) static bool js_gfx_GFXInputAssembler_setFirstVertex(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_setFirstVertex : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15202,7 +15202,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssembler_setFirstVertex) static bool js_gfx_GFXInputAssembler_getFirstVertex(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getFirstVertex : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15220,7 +15220,7 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getFirstVertex) static bool js_gfx_GFXInputAssembler_setVertexCount(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_setVertexCount : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15239,13 +15239,13 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssembler_setVertexCount) static bool js_gfx_GFXInputAssembler_getAttributes(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getAttributes : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getAttributes(); + const std::vector& result = cobj->getAttributes(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssembler_getAttributes : Error processing arguments"); return true; @@ -15257,13 +15257,13 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getAttributes) static bool js_gfx_GFXInputAssembler_getIndexBuffer(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getIndexBuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXBuffer* result = cobj->getIndexBuffer(); + cc::GFXBuffer* result = cobj->getIndexBuffer(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXInputAssembler_getIndexBuffer : Error processing arguments"); return true; @@ -15275,7 +15275,7 @@ SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getIndexBuffer) static bool js_gfx_GFXInputAssembler_setFirstIndex(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_setFirstIndex : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15294,7 +15294,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssembler_setFirstIndex) static bool js_gfx_GFXInputAssembler_setInstanceCount(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_setInstanceCount : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15313,7 +15313,7 @@ SE_BIND_PROP_SET(js_gfx_GFXInputAssembler_setInstanceCount) static bool js_gfx_GFXInputAssembler_getFirstInstance(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_getFirstInstance : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15329,37 +15329,37 @@ static bool js_gfx_GFXInputAssembler_getFirstInstance(se::State& s) } SE_BIND_PROP_GET(js_gfx_GFXInputAssembler_getFirstInstance) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXInputAssembler_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXInputAssembler_finalize) static bool js_gfx_GFXInputAssembler_constructor(se::State& s) { - //#3 cocos2d::GFXInputAssembler: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXInputAssembler constructor is skipped\")"); + //#3 cc::GFXInputAssembler: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXInputAssembler constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXInputAssembler_constructor, __jsb_cocos2d_GFXInputAssembler_class, js_cocos2d_GFXInputAssembler_finalize) +SE_BIND_CTOR(js_gfx_GFXInputAssembler_constructor, __jsb_cc_GFXInputAssembler_class, js_cc_GFXInputAssembler_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXInputAssembler_finalize(se::State& s) +static bool js_cc_GFXInputAssembler_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXInputAssembler)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXInputAssembler)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXInputAssembler_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXInputAssembler_finalize) bool js_register_gfx_GFXInputAssembler(se::Object* obj) { - auto cls = se::Class::create("GFXInputAssembler", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXInputAssembler_constructor)); + auto cls = se::Class::create("GFXInputAssembler", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXInputAssembler_constructor)); cls->defineProperty("instanceCount", _SE(js_gfx_GFXInputAssembler_getInstanceCount), _SE(js_gfx_GFXInputAssembler_setInstanceCount)); cls->defineProperty("vertexBuffers", _SE(js_gfx_GFXInputAssembler_getVertexBuffers), nullptr); @@ -15376,29 +15376,29 @@ bool js_register_gfx_GFXInputAssembler(se::Object* obj) cls->defineProperty("firstVertex", _SE(js_gfx_GFXInputAssembler_getFirstVertex), _SE(js_gfx_GFXInputAssembler_setFirstVertex)); cls->defineFunction("destroy", _SE(js_gfx_GFXInputAssembler_destroy)); cls->defineFunction("initialize", _SE(js_gfx_GFXInputAssembler_initialize)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXInputAssembler_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXInputAssembler_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXInputAssembler_proto = cls->getProto(); - __jsb_cocos2d_GFXInputAssembler_class = cls; + __jsb_cc_GFXInputAssembler_proto = cls->getProto(); + __jsb_cc_GFXInputAssembler_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXRenderPass_proto = nullptr; -se::Class* __jsb_cocos2d_GFXRenderPass_class = nullptr; +se::Object* __jsb_cc_GFXRenderPass_proto = nullptr; +se::Class* __jsb_cc_GFXRenderPass_class = nullptr; static bool js_gfx_GFXRenderPass_getColorAttachments(se::State& s) { - cocos2d::GFXRenderPass* cobj = (cocos2d::GFXRenderPass*)s.nativeThisObject(); + cc::GFXRenderPass* cobj = (cc::GFXRenderPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPass_getColorAttachments : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getColorAttachments(); + const std::vector& result = cobj->getColorAttachments(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXRenderPass_getColorAttachments : Error processing arguments"); return true; @@ -15410,13 +15410,13 @@ SE_BIND_PROP_GET(js_gfx_GFXRenderPass_getColorAttachments) static bool js_gfx_GFXRenderPass_getSubPasses(se::State& s) { - cocos2d::GFXRenderPass* cobj = (cocos2d::GFXRenderPass*)s.nativeThisObject(); + cc::GFXRenderPass* cobj = (cc::GFXRenderPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPass_getSubPasses : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getSubPasses(); + const std::vector& result = cobj->getSubPasses(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXRenderPass_getSubPasses : Error processing arguments"); return true; @@ -15428,7 +15428,7 @@ SE_BIND_PROP_GET(js_gfx_GFXRenderPass_getSubPasses) static bool js_gfx_GFXRenderPass_getHash(se::State& s) { - cocos2d::GFXRenderPass* cobj = (cocos2d::GFXRenderPass*)s.nativeThisObject(); + cc::GFXRenderPass* cobj = (cc::GFXRenderPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPass_getHash : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15446,13 +15446,13 @@ SE_BIND_PROP_GET(js_gfx_GFXRenderPass_getHash) static bool js_gfx_GFXRenderPass_initialize(se::State& s) { - cocos2d::GFXRenderPass* cobj = (cocos2d::GFXRenderPass*)s.nativeThisObject(); + cc::GFXRenderPass* cobj = (cc::GFXRenderPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPass_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXRenderPassInfo* arg0 = nullptr; + cc::GFXRenderPassInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXRenderPass_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -15467,7 +15467,7 @@ SE_BIND_FUNC(js_gfx_GFXRenderPass_initialize) static bool js_gfx_GFXRenderPass_destroy(se::State& s) { - cocos2d::GFXRenderPass* cobj = (cocos2d::GFXRenderPass*)s.nativeThisObject(); + cc::GFXRenderPass* cobj = (cc::GFXRenderPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPass_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15482,13 +15482,13 @@ SE_BIND_FUNC(js_gfx_GFXRenderPass_destroy) static bool js_gfx_GFXRenderPass_getDevice(se::State& s) { - cocos2d::GFXRenderPass* cobj = (cocos2d::GFXRenderPass*)s.nativeThisObject(); + cc::GFXRenderPass* cobj = (cc::GFXRenderPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPass_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXRenderPass_getDevice : Error processing arguments"); return true; @@ -15500,13 +15500,13 @@ SE_BIND_PROP_GET(js_gfx_GFXRenderPass_getDevice) static bool js_gfx_GFXRenderPass_getDepthStencilAttachment(se::State& s) { - cocos2d::GFXRenderPass* cobj = (cocos2d::GFXRenderPass*)s.nativeThisObject(); + cc::GFXRenderPass* cobj = (cc::GFXRenderPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXRenderPass_getDepthStencilAttachment : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::GFXDepthStencilAttachment& result = cobj->getDepthStencilAttachment(); + const cc::GFXDepthStencilAttachment& result = cobj->getDepthStencilAttachment(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXRenderPass_getDepthStencilAttachment : Error processing arguments"); return true; @@ -15516,37 +15516,37 @@ static bool js_gfx_GFXRenderPass_getDepthStencilAttachment(se::State& s) } SE_BIND_PROP_GET(js_gfx_GFXRenderPass_getDepthStencilAttachment) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXRenderPass_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXRenderPass_finalize) static bool js_gfx_GFXRenderPass_constructor(se::State& s) { - //#3 cocos2d::GFXRenderPass: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXRenderPass constructor is skipped\")"); + //#3 cc::GFXRenderPass: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXRenderPass constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXRenderPass_constructor, __jsb_cocos2d_GFXRenderPass_class, js_cocos2d_GFXRenderPass_finalize) +SE_BIND_CTOR(js_gfx_GFXRenderPass_constructor, __jsb_cc_GFXRenderPass_class, js_cc_GFXRenderPass_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXRenderPass_finalize(se::State& s) +static bool js_cc_GFXRenderPass_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXRenderPass)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXRenderPass)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXRenderPass* cobj = (cocos2d::GFXRenderPass*)s.nativeThisObject(); + cc::GFXRenderPass* cobj = (cc::GFXRenderPass*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXRenderPass_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXRenderPass_finalize) bool js_register_gfx_GFXRenderPass(se::Object* obj) { - auto cls = se::Class::create("GFXRenderPass", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXRenderPass_constructor)); + auto cls = se::Class::create("GFXRenderPass", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXRenderPass_constructor)); cls->defineProperty("device", _SE(js_gfx_GFXRenderPass_getDevice), nullptr); cls->defineProperty("colorAttachments", _SE(js_gfx_GFXRenderPass_getColorAttachments), nullptr); @@ -15555,29 +15555,29 @@ bool js_register_gfx_GFXRenderPass(se::Object* obj) cls->defineProperty("subPasses", _SE(js_gfx_GFXRenderPass_getSubPasses), nullptr); cls->defineFunction("initialize", _SE(js_gfx_GFXRenderPass_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXRenderPass_destroy)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXRenderPass_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXRenderPass_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXRenderPass_proto = cls->getProto(); - __jsb_cocos2d_GFXRenderPass_class = cls; + __jsb_cc_GFXRenderPass_proto = cls->getProto(); + __jsb_cc_GFXRenderPass_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXFramebuffer_proto = nullptr; -se::Class* __jsb_cocos2d_GFXFramebuffer_class = nullptr; +se::Object* __jsb_cc_GFXFramebuffer_proto = nullptr; +se::Class* __jsb_cc_GFXFramebuffer_class = nullptr; static bool js_gfx_GFXFramebuffer_getColorTextures(se::State& s) { - cocos2d::GFXFramebuffer* cobj = (cocos2d::GFXFramebuffer*)s.nativeThisObject(); + cc::GFXFramebuffer* cobj = (cc::GFXFramebuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebuffer_getColorTextures : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getColorTextures(); + const std::vector& result = cobj->getColorTextures(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXFramebuffer_getColorTextures : Error processing arguments"); return true; @@ -15589,13 +15589,13 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebuffer_getColorTextures) static bool js_gfx_GFXFramebuffer_getDepthStencilTexture(se::State& s) { - cocos2d::GFXFramebuffer* cobj = (cocos2d::GFXFramebuffer*)s.nativeThisObject(); + cc::GFXFramebuffer* cobj = (cc::GFXFramebuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebuffer_getDepthStencilTexture : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXTexture* result = cobj->getDepthStencilTexture(); + cc::GFXTexture* result = cobj->getDepthStencilTexture(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXFramebuffer_getDepthStencilTexture : Error processing arguments"); return true; @@ -15607,7 +15607,7 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebuffer_getDepthStencilTexture) static bool js_gfx_GFXFramebuffer_isOffscreen(se::State& s) { - cocos2d::GFXFramebuffer* cobj = (cocos2d::GFXFramebuffer*)s.nativeThisObject(); + cc::GFXFramebuffer* cobj = (cc::GFXFramebuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebuffer_isOffscreen : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15625,13 +15625,13 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebuffer_isOffscreen) static bool js_gfx_GFXFramebuffer_initialize(se::State& s) { - cocos2d::GFXFramebuffer* cobj = (cocos2d::GFXFramebuffer*)s.nativeThisObject(); + cc::GFXFramebuffer* cobj = (cc::GFXFramebuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebuffer_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXFramebufferInfo* arg0 = nullptr; + cc::GFXFramebufferInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXFramebuffer_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -15646,7 +15646,7 @@ SE_BIND_FUNC(js_gfx_GFXFramebuffer_initialize) static bool js_gfx_GFXFramebuffer_destroy(se::State& s) { - cocos2d::GFXFramebuffer* cobj = (cocos2d::GFXFramebuffer*)s.nativeThisObject(); + cc::GFXFramebuffer* cobj = (cc::GFXFramebuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebuffer_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15661,13 +15661,13 @@ SE_BIND_FUNC(js_gfx_GFXFramebuffer_destroy) static bool js_gfx_GFXFramebuffer_getRenderPass(se::State& s) { - cocos2d::GFXFramebuffer* cobj = (cocos2d::GFXFramebuffer*)s.nativeThisObject(); + cc::GFXFramebuffer* cobj = (cc::GFXFramebuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebuffer_getRenderPass : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXRenderPass* result = cobj->getRenderPass(); + cc::GFXRenderPass* result = cobj->getRenderPass(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXFramebuffer_getRenderPass : Error processing arguments"); return true; @@ -15679,13 +15679,13 @@ SE_BIND_PROP_GET(js_gfx_GFXFramebuffer_getRenderPass) static bool js_gfx_GFXFramebuffer_getDevice(se::State& s) { - cocos2d::GFXFramebuffer* cobj = (cocos2d::GFXFramebuffer*)s.nativeThisObject(); + cc::GFXFramebuffer* cobj = (cc::GFXFramebuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFramebuffer_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXFramebuffer_getDevice : Error processing arguments"); return true; @@ -15695,37 +15695,37 @@ static bool js_gfx_GFXFramebuffer_getDevice(se::State& s) } SE_BIND_PROP_GET(js_gfx_GFXFramebuffer_getDevice) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXFramebuffer_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXFramebuffer_finalize) static bool js_gfx_GFXFramebuffer_constructor(se::State& s) { - //#3 cocos2d::GFXFramebuffer: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXFramebuffer constructor is skipped\")"); + //#3 cc::GFXFramebuffer: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXFramebuffer constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXFramebuffer_constructor, __jsb_cocos2d_GFXFramebuffer_class, js_cocos2d_GFXFramebuffer_finalize) +SE_BIND_CTOR(js_gfx_GFXFramebuffer_constructor, __jsb_cc_GFXFramebuffer_class, js_cc_GFXFramebuffer_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXFramebuffer_finalize(se::State& s) +static bool js_cc_GFXFramebuffer_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXFramebuffer)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXFramebuffer)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXFramebuffer* cobj = (cocos2d::GFXFramebuffer*)s.nativeThisObject(); + cc::GFXFramebuffer* cobj = (cc::GFXFramebuffer*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXFramebuffer_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXFramebuffer_finalize) bool js_register_gfx_GFXFramebuffer(se::Object* obj) { - auto cls = se::Class::create("GFXFramebuffer", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXFramebuffer_constructor)); + auto cls = se::Class::create("GFXFramebuffer", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXFramebuffer_constructor)); cls->defineProperty("device", _SE(js_gfx_GFXFramebuffer_getDevice), nullptr); cls->defineProperty("renderPass", _SE(js_gfx_GFXFramebuffer_getRenderPass), nullptr); @@ -15734,29 +15734,29 @@ bool js_register_gfx_GFXFramebuffer(se::Object* obj) cls->defineProperty("isOffscreen", _SE(js_gfx_GFXFramebuffer_isOffscreen), nullptr); cls->defineFunction("initialize", _SE(js_gfx_GFXFramebuffer_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXFramebuffer_destroy)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXFramebuffer_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXFramebuffer_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXFramebuffer_proto = cls->getProto(); - __jsb_cocos2d_GFXFramebuffer_class = cls; + __jsb_cc_GFXFramebuffer_proto = cls->getProto(); + __jsb_cc_GFXFramebuffer_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXBindingLayout_proto = nullptr; -se::Class* __jsb_cocos2d_GFXBindingLayout_class = nullptr; +se::Object* __jsb_cc_GFXBindingLayout_proto = nullptr; +se::Class* __jsb_cc_GFXBindingLayout_class = nullptr; static bool js_gfx_GFXBindingLayout_getBindingUnits(se::State& s) { - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayout_getBindingUnits : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getBindingUnits(); + const std::vector& result = cobj->getBindingUnits(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingLayout_getBindingUnits : Error processing arguments"); return true; @@ -15768,14 +15768,14 @@ SE_BIND_PROP_GET(js_gfx_GFXBindingLayout_getBindingUnits) static bool js_gfx_GFXBindingLayout_bindBuffer(se::State& s) { - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayout_bindBuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { unsigned int arg0 = 0; - cocos2d::GFXBuffer* arg1 = nullptr; + cc::GFXBuffer* arg1 = nullptr; ok &= seval_to_uint32(args[0], (uint32_t*)&arg0); ok &= seval_to_native_ptr(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingLayout_bindBuffer : Error processing arguments"); @@ -15789,14 +15789,14 @@ SE_BIND_FUNC(js_gfx_GFXBindingLayout_bindBuffer) static bool js_gfx_GFXBindingLayout_bindSampler(se::State& s) { - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayout_bindSampler : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { unsigned int arg0 = 0; - cocos2d::GFXSampler* arg1 = nullptr; + cc::GFXSampler* arg1 = nullptr; ok &= seval_to_uint32(args[0], (uint32_t*)&arg0); ok &= seval_to_native_ptr(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingLayout_bindSampler : Error processing arguments"); @@ -15810,7 +15810,7 @@ SE_BIND_FUNC(js_gfx_GFXBindingLayout_bindSampler) static bool js_gfx_GFXBindingLayout_update(se::State& s) { - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayout_update : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15825,14 +15825,14 @@ SE_BIND_FUNC(js_gfx_GFXBindingLayout_update) static bool js_gfx_GFXBindingLayout_bindTexture(se::State& s) { - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayout_bindTexture : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { unsigned int arg0 = 0; - cocos2d::GFXTexture* arg1 = nullptr; + cc::GFXTexture* arg1 = nullptr; ok &= seval_to_uint32(args[0], (uint32_t*)&arg0); ok &= seval_to_native_ptr(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingLayout_bindTexture : Error processing arguments"); @@ -15846,13 +15846,13 @@ SE_BIND_FUNC(js_gfx_GFXBindingLayout_bindTexture) static bool js_gfx_GFXBindingLayout_initialize(se::State& s) { - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayout_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXBindingLayoutInfo* arg0 = nullptr; + cc::GFXBindingLayoutInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingLayout_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -15867,7 +15867,7 @@ SE_BIND_FUNC(js_gfx_GFXBindingLayout_initialize) static bool js_gfx_GFXBindingLayout_destroy(se::State& s) { - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayout_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -15882,13 +15882,13 @@ SE_BIND_FUNC(js_gfx_GFXBindingLayout_destroy) static bool js_gfx_GFXBindingLayout_getDevice(se::State& s) { - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBindingLayout_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXBindingLayout_getDevice : Error processing arguments"); return true; @@ -15898,37 +15898,37 @@ static bool js_gfx_GFXBindingLayout_getDevice(se::State& s) } SE_BIND_PROP_GET(js_gfx_GFXBindingLayout_getDevice) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXBindingLayout_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXBindingLayout_finalize) static bool js_gfx_GFXBindingLayout_constructor(se::State& s) { - //#3 cocos2d::GFXBindingLayout: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXBindingLayout constructor is skipped\")"); + //#3 cc::GFXBindingLayout: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXBindingLayout constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXBindingLayout_constructor, __jsb_cocos2d_GFXBindingLayout_class, js_cocos2d_GFXBindingLayout_finalize) +SE_BIND_CTOR(js_gfx_GFXBindingLayout_constructor, __jsb_cc_GFXBindingLayout_class, js_cc_GFXBindingLayout_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXBindingLayout_finalize(se::State& s) +static bool js_cc_GFXBindingLayout_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXBindingLayout)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXBindingLayout)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXBindingLayout* cobj = (cocos2d::GFXBindingLayout*)s.nativeThisObject(); + cc::GFXBindingLayout* cobj = (cc::GFXBindingLayout*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXBindingLayout_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXBindingLayout_finalize) bool js_register_gfx_GFXBindingLayout(se::Object* obj) { - auto cls = se::Class::create("GFXBindingLayout", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXBindingLayout_constructor)); + auto cls = se::Class::create("GFXBindingLayout", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXBindingLayout_constructor)); cls->defineProperty("device", _SE(js_gfx_GFXBindingLayout_getDevice), nullptr); cls->defineProperty("bindingUnits", _SE(js_gfx_GFXBindingLayout_getBindingUnits), nullptr); @@ -15938,29 +15938,29 @@ bool js_register_gfx_GFXBindingLayout(se::Object* obj) cls->defineFunction("bindTexture", _SE(js_gfx_GFXBindingLayout_bindTexture)); cls->defineFunction("initialize", _SE(js_gfx_GFXBindingLayout_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXBindingLayout_destroy)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXBindingLayout_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXBindingLayout_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXBindingLayout_proto = cls->getProto(); - __jsb_cocos2d_GFXBindingLayout_class = cls; + __jsb_cc_GFXBindingLayout_proto = cls->getProto(); + __jsb_cc_GFXBindingLayout_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXPipelineLayout_proto = nullptr; -se::Class* __jsb_cocos2d_GFXPipelineLayout_class = nullptr; +se::Object* __jsb_cc_GFXPipelineLayout_proto = nullptr; +se::Class* __jsb_cc_GFXPipelineLayout_class = nullptr; static bool js_gfx_GFXPipelineLayout_getLayouts(se::State& s) { - cocos2d::GFXPipelineLayout* cobj = (cocos2d::GFXPipelineLayout*)s.nativeThisObject(); + cc::GFXPipelineLayout* cobj = (cc::GFXPipelineLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayout_getLayouts : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getLayouts(); + const std::vector& result = cobj->getLayouts(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineLayout_getLayouts : Error processing arguments"); return true; @@ -15972,13 +15972,13 @@ SE_BIND_FUNC(js_gfx_GFXPipelineLayout_getLayouts) static bool js_gfx_GFXPipelineLayout_initialize(se::State& s) { - cocos2d::GFXPipelineLayout* cobj = (cocos2d::GFXPipelineLayout*)s.nativeThisObject(); + cc::GFXPipelineLayout* cobj = (cc::GFXPipelineLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayout_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXPipelineLayoutInfo* arg0 = nullptr; + cc::GFXPipelineLayoutInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineLayout_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -15993,7 +15993,7 @@ SE_BIND_FUNC(js_gfx_GFXPipelineLayout_initialize) static bool js_gfx_GFXPipelineLayout_destroy(se::State& s) { - cocos2d::GFXPipelineLayout* cobj = (cocos2d::GFXPipelineLayout*)s.nativeThisObject(); + cc::GFXPipelineLayout* cobj = (cc::GFXPipelineLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayout_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16008,13 +16008,13 @@ SE_BIND_FUNC(js_gfx_GFXPipelineLayout_destroy) static bool js_gfx_GFXPipelineLayout_getDevice(se::State& s) { - cocos2d::GFXPipelineLayout* cobj = (cocos2d::GFXPipelineLayout*)s.nativeThisObject(); + cc::GFXPipelineLayout* cobj = (cc::GFXPipelineLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayout_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineLayout_getDevice : Error processing arguments"); return true; @@ -16026,13 +16026,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineLayout_getDevice) static bool js_gfx_GFXPipelineLayout_getPushConstantsRanges(se::State& s) { - cocos2d::GFXPipelineLayout* cobj = (cocos2d::GFXPipelineLayout*)s.nativeThisObject(); + cc::GFXPipelineLayout* cobj = (cc::GFXPipelineLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayout_getPushConstantsRanges : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getPushConstantsRanges(); + const std::vector& result = cobj->getPushConstantsRanges(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineLayout_getPushConstantsRanges : Error processing arguments"); return true; @@ -16042,66 +16042,66 @@ static bool js_gfx_GFXPipelineLayout_getPushConstantsRanges(se::State& s) } SE_BIND_FUNC(js_gfx_GFXPipelineLayout_getPushConstantsRanges) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXPipelineLayout_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXPipelineLayout_finalize) static bool js_gfx_GFXPipelineLayout_constructor(se::State& s) { - //#3 cocos2d::GFXPipelineLayout: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXPipelineLayout constructor is skipped\")"); + //#3 cc::GFXPipelineLayout: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXPipelineLayout constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXPipelineLayout_constructor, __jsb_cocos2d_GFXPipelineLayout_class, js_cocos2d_GFXPipelineLayout_finalize) +SE_BIND_CTOR(js_gfx_GFXPipelineLayout_constructor, __jsb_cc_GFXPipelineLayout_class, js_cc_GFXPipelineLayout_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXPipelineLayout_finalize(se::State& s) +static bool js_cc_GFXPipelineLayout_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXPipelineLayout)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXPipelineLayout)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXPipelineLayout* cobj = (cocos2d::GFXPipelineLayout*)s.nativeThisObject(); + cc::GFXPipelineLayout* cobj = (cc::GFXPipelineLayout*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXPipelineLayout_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXPipelineLayout_finalize) bool js_register_gfx_GFXPipelineLayout(se::Object* obj) { - auto cls = se::Class::create("GFXPipelineLayout", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXPipelineLayout_constructor)); + auto cls = se::Class::create("GFXPipelineLayout", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXPipelineLayout_constructor)); cls->defineProperty("device", _SE(js_gfx_GFXPipelineLayout_getDevice), nullptr); cls->defineFunction("getLayouts", _SE(js_gfx_GFXPipelineLayout_getLayouts)); cls->defineFunction("initialize", _SE(js_gfx_GFXPipelineLayout_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXPipelineLayout_destroy)); cls->defineFunction("getPushConstantsRanges", _SE(js_gfx_GFXPipelineLayout_getPushConstantsRanges)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXPipelineLayout_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXPipelineLayout_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXPipelineLayout_proto = cls->getProto(); - __jsb_cocos2d_GFXPipelineLayout_class = cls; + __jsb_cc_GFXPipelineLayout_proto = cls->getProto(); + __jsb_cc_GFXPipelineLayout_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXPipelineState_proto = nullptr; -se::Class* __jsb_cocos2d_GFXPipelineState_class = nullptr; +se::Object* __jsb_cc_GFXPipelineState_proto = nullptr; +se::Class* __jsb_cc_GFXPipelineState_class = nullptr; static bool js_gfx_GFXPipelineState_getRasterizerState(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getRasterizerState : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::GFXRasterizerState& result = cobj->getRasterizerState(); + const cc::GFXRasterizerState& result = cobj->getRasterizerState(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getRasterizerState : Error processing arguments"); return true; @@ -16113,13 +16113,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getRasterizerState) static bool js_gfx_GFXPipelineState_getShader(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getShader : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXShader* result = cobj->getShader(); + cc::GFXShader* result = cobj->getShader(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getShader : Error processing arguments"); return true; @@ -16131,13 +16131,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getShader) static bool js_gfx_GFXPipelineState_getInputState(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getInputState : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::GFXInputState& result = cobj->getInputState(); + const cc::GFXInputState& result = cobj->getInputState(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getInputState : Error processing arguments"); return true; @@ -16149,7 +16149,7 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getInputState) static bool js_gfx_GFXPipelineState_getPrimitive(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getPrimitive : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16167,13 +16167,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getPrimitive) static bool js_gfx_GFXPipelineState_getDepthStencilState(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getDepthStencilState : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::GFXDepthStencilState& result = cobj->getDepthStencilState(); + const cc::GFXDepthStencilState& result = cobj->getDepthStencilState(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getDepthStencilState : Error processing arguments"); return true; @@ -16185,13 +16185,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getDepthStencilState) static bool js_gfx_GFXPipelineState_getBlendState(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getBlendState : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::GFXBlendState& result = cobj->getBlendState(); + const cc::GFXBlendState& result = cobj->getBlendState(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getBlendState : Error processing arguments"); return true; @@ -16203,13 +16203,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getBlendState) static bool js_gfx_GFXPipelineState_getPipelineLayout(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getPipelineLayout : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::GFXPipelineLayout* result = cobj->getPipelineLayout(); + const cc::GFXPipelineLayout* result = cobj->getPipelineLayout(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getPipelineLayout : Error processing arguments"); return true; @@ -16221,13 +16221,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getPipelineLayout) static bool js_gfx_GFXPipelineState_initialize(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXPipelineStateInfo* arg0 = nullptr; + cc::GFXPipelineStateInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -16242,7 +16242,7 @@ SE_BIND_FUNC(js_gfx_GFXPipelineState_initialize) static bool js_gfx_GFXPipelineState_destroy(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16257,13 +16257,13 @@ SE_BIND_FUNC(js_gfx_GFXPipelineState_destroy) static bool js_gfx_GFXPipelineState_getRenderPass(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getRenderPass : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const cocos2d::GFXRenderPass* result = cobj->getRenderPass(); + const cc::GFXRenderPass* result = cobj->getRenderPass(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getRenderPass : Error processing arguments"); return true; @@ -16275,13 +16275,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getRenderPass) static bool js_gfx_GFXPipelineState_getDevice(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getDevice : Error processing arguments"); return true; @@ -16293,13 +16293,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineState_getDevice) static bool js_gfx_GFXPipelineState_getDynamicStates(se::State& s) { - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineState_getDynamicStates : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - const std::vector& result = cobj->getDynamicStates(); + const std::vector& result = cobj->getDynamicStates(); ok &= std_vector_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXPipelineState_getDynamicStates : Error processing arguments"); return true; @@ -16309,37 +16309,37 @@ static bool js_gfx_GFXPipelineState_getDynamicStates(se::State& s) } SE_BIND_FUNC(js_gfx_GFXPipelineState_getDynamicStates) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXPipelineState_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXPipelineState_finalize) static bool js_gfx_GFXPipelineState_constructor(se::State& s) { - //#3 cocos2d::GFXPipelineState: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXPipelineState constructor is skipped\")"); + //#3 cc::GFXPipelineState: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXPipelineState constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXPipelineState_constructor, __jsb_cocos2d_GFXPipelineState_class, js_cocos2d_GFXPipelineState_finalize) +SE_BIND_CTOR(js_gfx_GFXPipelineState_constructor, __jsb_cc_GFXPipelineState_class, js_cc_GFXPipelineState_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXPipelineState_finalize(se::State& s) +static bool js_cc_GFXPipelineState_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXPipelineState)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXPipelineState)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXPipelineState* cobj = (cocos2d::GFXPipelineState*)s.nativeThisObject(); + cc::GFXPipelineState* cobj = (cc::GFXPipelineState*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXPipelineState_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXPipelineState_finalize) bool js_register_gfx_GFXPipelineState(se::Object* obj) { - auto cls = se::Class::create("GFXPipelineState", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXPipelineState_constructor)); + auto cls = se::Class::create("GFXPipelineState", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXPipelineState_constructor)); cls->defineProperty("primitive", _SE(js_gfx_GFXPipelineState_getPrimitive), nullptr); cls->defineProperty("rasterizerState", _SE(js_gfx_GFXPipelineState_getRasterizerState), nullptr); @@ -16353,29 +16353,29 @@ bool js_register_gfx_GFXPipelineState(se::Object* obj) cls->defineFunction("initialize", _SE(js_gfx_GFXPipelineState_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXPipelineState_destroy)); cls->defineFunction("getDynamicStates", _SE(js_gfx_GFXPipelineState_getDynamicStates)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXPipelineState_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXPipelineState_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXPipelineState_proto = cls->getProto(); - __jsb_cocos2d_GFXPipelineState_class = cls; + __jsb_cc_GFXPipelineState_proto = cls->getProto(); + __jsb_cc_GFXPipelineState_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXCommandAllocator_proto = nullptr; -se::Class* __jsb_cocos2d_GFXCommandAllocator_class = nullptr; +se::Object* __jsb_cc_GFXCommandAllocator_proto = nullptr; +se::Class* __jsb_cc_GFXCommandAllocator_class = nullptr; static bool js_gfx_GFXCommandAllocator_initialize(se::State& s) { - cocos2d::GFXCommandAllocator* cobj = (cocos2d::GFXCommandAllocator*)s.nativeThisObject(); + cc::GFXCommandAllocator* cobj = (cc::GFXCommandAllocator*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandAllocator_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXCommandAllocatorInfo* arg0 = nullptr; + cc::GFXCommandAllocatorInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandAllocator_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -16390,7 +16390,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandAllocator_initialize) static bool js_gfx_GFXCommandAllocator_destroy(se::State& s) { - cocos2d::GFXCommandAllocator* cobj = (cocos2d::GFXCommandAllocator*)s.nativeThisObject(); + cc::GFXCommandAllocator* cobj = (cc::GFXCommandAllocator*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandAllocator_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16405,13 +16405,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandAllocator_destroy) static bool js_gfx_GFXCommandAllocator_getDevice(se::State& s) { - cocos2d::GFXCommandAllocator* cobj = (cocos2d::GFXCommandAllocator*)s.nativeThisObject(); + cc::GFXCommandAllocator* cobj = (cc::GFXCommandAllocator*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandAllocator_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandAllocator_getDevice : Error processing arguments"); return true; @@ -16421,64 +16421,64 @@ static bool js_gfx_GFXCommandAllocator_getDevice(se::State& s) } SE_BIND_FUNC(js_gfx_GFXCommandAllocator_getDevice) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXCommandAllocator_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXCommandAllocator_finalize) static bool js_gfx_GFXCommandAllocator_constructor(se::State& s) { - //#3 cocos2d::GFXCommandAllocator: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXCommandAllocator constructor is skipped\")"); + //#3 cc::GFXCommandAllocator: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXCommandAllocator constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXCommandAllocator_constructor, __jsb_cocos2d_GFXCommandAllocator_class, js_cocos2d_GFXCommandAllocator_finalize) +SE_BIND_CTOR(js_gfx_GFXCommandAllocator_constructor, __jsb_cc_GFXCommandAllocator_class, js_cc_GFXCommandAllocator_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXCommandAllocator_finalize(se::State& s) +static bool js_cc_GFXCommandAllocator_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXCommandAllocator)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXCommandAllocator)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXCommandAllocator* cobj = (cocos2d::GFXCommandAllocator*)s.nativeThisObject(); + cc::GFXCommandAllocator* cobj = (cc::GFXCommandAllocator*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXCommandAllocator_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXCommandAllocator_finalize) bool js_register_gfx_GFXCommandAllocator(se::Object* obj) { - auto cls = se::Class::create("GFXCommandAllocator", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXCommandAllocator_constructor)); + auto cls = se::Class::create("GFXCommandAllocator", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXCommandAllocator_constructor)); cls->defineFunction("initialize", _SE(js_gfx_GFXCommandAllocator_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXCommandAllocator_destroy)); cls->defineFunction("getDevice", _SE(js_gfx_GFXCommandAllocator_getDevice)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXCommandAllocator_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXCommandAllocator_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXCommandAllocator_proto = cls->getProto(); - __jsb_cocos2d_GFXCommandAllocator_class = cls; + __jsb_cc_GFXCommandAllocator_proto = cls->getProto(); + __jsb_cc_GFXCommandAllocator_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXCommandBuffer_proto = nullptr; -se::Class* __jsb_cocos2d_GFXCommandBuffer_class = nullptr; +se::Object* __jsb_cc_GFXCommandBuffer_proto = nullptr; +se::Class* __jsb_cc_GFXCommandBuffer_class = nullptr; static bool js_gfx_GFXCommandBuffer_draw(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_draw : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXInputAssembler* arg0 = nullptr; + cc::GFXInputAssembler* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_draw : Error processing arguments"); cobj->draw(arg0); @@ -16491,13 +16491,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_draw) static bool js_gfx_GFXCommandBuffer_setBlendConstants(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_setBlendConstants : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXColor* arg0 = nullptr; + cc::GFXColor* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_setBlendConstants : Error processing arguments"); cobj->setBlendConstants(*arg0); @@ -16510,7 +16510,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_setBlendConstants) static bool js_gfx_GFXCommandBuffer_setDepthBound(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_setDepthBound : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16531,13 +16531,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_setDepthBound) static bool js_gfx_GFXCommandBuffer_getAllocator(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_getAllocator : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXCommandAllocator* result = cobj->getAllocator(); + cc::GFXCommandAllocator* result = cobj->getAllocator(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_getAllocator : Error processing arguments"); return true; @@ -16549,19 +16549,19 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_getAllocator) static bool js_gfx_GFXCommandBuffer_copyBufferToTexture(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_copyBufferToTexture : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 4) { - cocos2d::GFXBuffer* arg0 = nullptr; - cocos2d::GFXTexture* arg1 = nullptr; - cocos2d::GFXTextureLayout arg2; - std::vector arg3; + cc::GFXBuffer* arg0 = nullptr; + cc::GFXTexture* arg1 = nullptr; + cc::GFXTextureLayout arg2; + std::vector arg3; ok &= seval_to_native_ptr(args[0], &arg0); ok &= seval_to_native_ptr(args[1], &arg1); - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXTextureLayout)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXTextureLayout)tmp; } while(false); ok &= seval_to_std_vector(args[3], &arg3); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_copyBufferToTexture : Error processing arguments"); cobj->copyBufferToTexture(arg0, arg1, arg2, arg3); @@ -16574,7 +16574,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_copyBufferToTexture) static bool js_gfx_GFXCommandBuffer_setLineWidth(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_setLineWidth : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16593,13 +16593,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_setLineWidth) static bool js_gfx_GFXCommandBuffer_updateBuffer(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_updateBuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 3) { - cocos2d::GFXBuffer* arg0 = nullptr; + cc::GFXBuffer* arg0 = nullptr; void* arg1 = nullptr; unsigned int arg2 = 0; ok &= seval_to_native_ptr(args[0], &arg0); @@ -16610,7 +16610,7 @@ static bool js_gfx_GFXCommandBuffer_updateBuffer(se::State& s) return true; } if (argc == 4) { - cocos2d::GFXBuffer* arg0 = nullptr; + cc::GFXBuffer* arg0 = nullptr; void* arg1 = nullptr; unsigned int arg2 = 0; unsigned int arg3 = 0; @@ -16629,7 +16629,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_updateBuffer) static bool js_gfx_GFXCommandBuffer_end(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_end : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16644,15 +16644,15 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_end) static bool js_gfx_GFXCommandBuffer_setStencilWriteMask(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_setStencilWriteMask : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { - cocos2d::GFXStencilFace arg0; + cc::GFXStencilFace arg0; unsigned int arg1 = 0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStencilFace)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStencilFace)tmp; } while(false); ok &= seval_to_uint32(args[1], (uint32_t*)&arg1); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_setStencilWriteMask : Error processing arguments"); cobj->setStencilWriteMask(arg0, arg1); @@ -16665,7 +16665,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_setStencilWriteMask) static bool js_gfx_GFXCommandBuffer_getNumInstances(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_getNumInstances : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16683,16 +16683,16 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_getNumInstances) static bool js_gfx_GFXCommandBuffer_setStencilCompareMask(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_setStencilCompareMask : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 3) { - cocos2d::GFXStencilFace arg0; + cc::GFXStencilFace arg0; int arg1 = 0; unsigned int arg2 = 0; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXStencilFace)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXStencilFace)tmp; } while(false); do { int32_t tmp = 0; ok &= seval_to_int32(args[1], &tmp); arg1 = (int)tmp; } while(false); ok &= seval_to_uint32(args[2], (uint32_t*)&arg2); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_setStencilCompareMask : Error processing arguments"); @@ -16706,13 +16706,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_setStencilCompareMask) static bool js_gfx_GFXCommandBuffer_bindInputAssembler(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_bindInputAssembler : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXInputAssembler* arg0 = nullptr; + cc::GFXInputAssembler* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_bindInputAssembler : Error processing arguments"); cobj->bindInputAssembler(arg0); @@ -16725,13 +16725,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_bindInputAssembler) static bool js_gfx_GFXCommandBuffer_bindPipelineState(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_bindPipelineState : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXPipelineState* arg0 = nullptr; + cc::GFXPipelineState* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_bindPipelineState : Error processing arguments"); cobj->bindPipelineState(arg0); @@ -16744,7 +16744,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_bindPipelineState) static bool js_gfx_GFXCommandBuffer_destroy(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16759,13 +16759,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_destroy) static bool js_gfx_GFXCommandBuffer_getDevice(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_getDevice : Error processing arguments"); return true; @@ -16777,7 +16777,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_getDevice) static bool js_gfx_GFXCommandBuffer_getNumTris(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_getNumTris : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16795,13 +16795,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_getNumTris) static bool js_gfx_GFXCommandBuffer_setViewport(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_setViewport : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXViewport* arg0 = nullptr; + cc::GFXViewport* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_setViewport : Error processing arguments"); cobj->setViewport(*arg0); @@ -16814,7 +16814,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_setViewport) static bool js_gfx_GFXCommandBuffer_setDepthBias(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_setDepthBias : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16837,7 +16837,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_setDepthBias) static bool js_gfx_GFXCommandBuffer_begin(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_begin : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16847,14 +16847,14 @@ static bool js_gfx_GFXCommandBuffer_begin(se::State& s) return true; } if (argc == 1) { - cocos2d::GFXRenderPass* arg0 = nullptr; + cc::GFXRenderPass* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_begin : Error processing arguments"); cobj->begin(arg0); return true; } if (argc == 2) { - cocos2d::GFXRenderPass* arg0 = nullptr; + cc::GFXRenderPass* arg0 = nullptr; unsigned int arg1 = 0; ok &= seval_to_native_ptr(args[0], &arg0); ok &= seval_to_uint32(args[1], (uint32_t*)&arg1); @@ -16863,9 +16863,9 @@ static bool js_gfx_GFXCommandBuffer_begin(se::State& s) return true; } if (argc == 3) { - cocos2d::GFXRenderPass* arg0 = nullptr; + cc::GFXRenderPass* arg0 = nullptr; unsigned int arg1 = 0; - cocos2d::GFXFramebuffer* arg2 = nullptr; + cc::GFXFramebuffer* arg2 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); ok &= seval_to_uint32(args[1], (uint32_t*)&arg1); ok &= seval_to_native_ptr(args[2], &arg2); @@ -16880,7 +16880,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_begin) static bool js_gfx_GFXCommandBuffer_getType(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_getType : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16898,13 +16898,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_getType) static bool js_gfx_GFXCommandBuffer_bindBindingLayout(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_bindBindingLayout : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXBindingLayout* arg0 = nullptr; + cc::GFXBindingLayout* arg0 = nullptr; ok &= seval_to_native_ptr(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_bindBindingLayout : Error processing arguments"); cobj->bindBindingLayout(arg0); @@ -16917,7 +16917,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_bindBindingLayout) static bool js_gfx_GFXCommandBuffer_endRenderPass(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_endRenderPass : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -16932,13 +16932,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_endRenderPass) static bool js_gfx_GFXCommandBuffer_initialize(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXCommandBufferInfo* arg0 = nullptr; + cc::GFXCommandBufferInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -16953,13 +16953,13 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_initialize) static bool js_gfx_GFXCommandBuffer_setScissor(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_setScissor : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXRect* arg0 = nullptr; + cc::GFXRect* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXCommandBuffer_setScissor : Error processing arguments"); cobj->setScissor(*arg0); @@ -16972,21 +16972,21 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_setScissor) static bool js_gfx_GFXCommandBuffer_beginRenderPass(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_beginRenderPass : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 6) { - cocos2d::GFXFramebuffer* arg0 = nullptr; - cocos2d::GFXRect* arg1 = nullptr; - cocos2d::GFXClearFlagBit arg2; - std::vector arg3; + cc::GFXFramebuffer* arg0 = nullptr; + cc::GFXRect* arg1 = nullptr; + cc::GFXClearFlagBit arg2; + std::vector arg3; float arg4 = 0; int arg5 = 0; ok &= seval_to_native_ptr(args[0], &arg0); ok &= seval_to_reference(args[1], &arg1); - do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cocos2d::GFXClearFlagBit)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(args[2], &tmp); arg2 = (cc::GFXClearFlagBit)tmp; } while(false); ok &= seval_to_std_vector(args[3], &arg3); ok &= seval_to_float(args[4], &arg4); do { int32_t tmp = 0; ok &= seval_to_int32(args[5], &tmp); arg5 = (int)tmp; } while(false); @@ -17001,7 +17001,7 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_beginRenderPass) static bool js_gfx_GFXCommandBuffer_getNumDrawCalls(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_getNumDrawCalls : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -17017,37 +17017,37 @@ static bool js_gfx_GFXCommandBuffer_getNumDrawCalls(se::State& s) } SE_BIND_FUNC(js_gfx_GFXCommandBuffer_getNumDrawCalls) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXCommandBuffer_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXCommandBuffer_finalize) static bool js_gfx_GFXCommandBuffer_constructor(se::State& s) { - //#3 cocos2d::GFXCommandBuffer: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXCommandBuffer constructor is skipped\")"); + //#3 cc::GFXCommandBuffer: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXCommandBuffer constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXCommandBuffer_constructor, __jsb_cocos2d_GFXCommandBuffer_class, js_cocos2d_GFXCommandBuffer_finalize) +SE_BIND_CTOR(js_gfx_GFXCommandBuffer_constructor, __jsb_cc_GFXCommandBuffer_class, js_cc_GFXCommandBuffer_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXCommandBuffer_finalize(se::State& s) +static bool js_cc_GFXCommandBuffer_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXCommandBuffer)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXCommandBuffer)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXCommandBuffer_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXCommandBuffer_finalize) bool js_register_gfx_GFXCommandBuffer(se::Object* obj) { - auto cls = se::Class::create("GFXCommandBuffer", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXCommandBuffer_constructor)); + auto cls = se::Class::create("GFXCommandBuffer", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXCommandBuffer_constructor)); cls->defineFunction("draw", _SE(js_gfx_GFXCommandBuffer_draw)); cls->defineFunction("setBlendConstants", _SE(js_gfx_GFXCommandBuffer_setBlendConstants)); @@ -17075,29 +17075,29 @@ bool js_register_gfx_GFXCommandBuffer(se::Object* obj) cls->defineFunction("setScissor", _SE(js_gfx_GFXCommandBuffer_setScissor)); cls->defineFunction("beginRenderPass", _SE(js_gfx_GFXCommandBuffer_beginRenderPass)); cls->defineFunction("getNumDrawCalls", _SE(js_gfx_GFXCommandBuffer_getNumDrawCalls)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXCommandBuffer_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXCommandBuffer_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXCommandBuffer_proto = cls->getProto(); - __jsb_cocos2d_GFXCommandBuffer_class = cls; + __jsb_cc_GFXCommandBuffer_proto = cls->getProto(); + __jsb_cc_GFXCommandBuffer_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXFence_proto = nullptr; -se::Class* __jsb_cocos2d_GFXFence_class = nullptr; +se::Object* __jsb_cc_GFXFence_proto = nullptr; +se::Class* __jsb_cc_GFXFence_class = nullptr; static bool js_gfx_GFXFence_initialize(se::State& s) { - cocos2d::GFXFence* cobj = (cocos2d::GFXFence*)s.nativeThisObject(); + cc::GFXFence* cobj = (cc::GFXFence*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFence_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXFenceInfo* arg0 = nullptr; + cc::GFXFenceInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXFence_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -17112,7 +17112,7 @@ SE_BIND_FUNC(js_gfx_GFXFence_initialize) static bool js_gfx_GFXFence_destroy(se::State& s) { - cocos2d::GFXFence* cobj = (cocos2d::GFXFence*)s.nativeThisObject(); + cc::GFXFence* cobj = (cc::GFXFence*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFence_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -17127,7 +17127,7 @@ SE_BIND_FUNC(js_gfx_GFXFence_destroy) static bool js_gfx_GFXFence_wait(se::State& s) { - cocos2d::GFXFence* cobj = (cocos2d::GFXFence*)s.nativeThisObject(); + cc::GFXFence* cobj = (cc::GFXFence*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFence_wait : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -17142,7 +17142,7 @@ SE_BIND_FUNC(js_gfx_GFXFence_wait) static bool js_gfx_GFXFence_reset(se::State& s) { - cocos2d::GFXFence* cobj = (cocos2d::GFXFence*)s.nativeThisObject(); + cc::GFXFence* cobj = (cc::GFXFence*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXFence_reset : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -17155,59 +17155,59 @@ static bool js_gfx_GFXFence_reset(se::State& s) } SE_BIND_FUNC(js_gfx_GFXFence_reset) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXFence_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXFence_finalize) static bool js_gfx_GFXFence_constructor(se::State& s) { - //#3 cocos2d::GFXFence: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXFence constructor is skipped\")"); + //#3 cc::GFXFence: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXFence constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXFence_constructor, __jsb_cocos2d_GFXFence_class, js_cocos2d_GFXFence_finalize) +SE_BIND_CTOR(js_gfx_GFXFence_constructor, __jsb_cc_GFXFence_class, js_cc_GFXFence_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXFence_finalize(se::State& s) +static bool js_cc_GFXFence_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXFence)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXFence)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXFence* cobj = (cocos2d::GFXFence*)s.nativeThisObject(); + cc::GFXFence* cobj = (cc::GFXFence*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXFence_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXFence_finalize) bool js_register_gfx_GFXFence(se::Object* obj) { - auto cls = se::Class::create("GFXFence", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXFence_constructor)); + auto cls = se::Class::create("GFXFence", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXFence_constructor)); cls->defineFunction("initialize", _SE(js_gfx_GFXFence_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXFence_destroy)); cls->defineFunction("wait", _SE(js_gfx_GFXFence_wait)); cls->defineFunction("reset", _SE(js_gfx_GFXFence_reset)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXFence_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXFence_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXFence_proto = cls->getProto(); - __jsb_cocos2d_GFXFence_class = cls; + __jsb_cc_GFXFence_proto = cls->getProto(); + __jsb_cc_GFXFence_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; } -se::Object* __jsb_cocos2d_GFXQueue_proto = nullptr; -se::Class* __jsb_cocos2d_GFXQueue_class = nullptr; +se::Object* __jsb_cc_GFXQueue_proto = nullptr; +se::Class* __jsb_cc_GFXQueue_class = nullptr; static bool js_gfx_GFXQueue_getType(se::State& s) { - cocos2d::GFXQueue* cobj = (cocos2d::GFXQueue*)s.nativeThisObject(); + cc::GFXQueue* cobj = (cc::GFXQueue*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXQueue_getType : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -17226,13 +17226,13 @@ SE_BIND_PROP_GET(js_gfx_GFXQueue_getType) static bool js_gfx_GFXQueue_submit(se::State& s) { CC_UNUSED bool ok = true; - cocos2d::GFXQueue* cobj = (cocos2d::GFXQueue*)s.nativeThisObject(); + cc::GFXQueue* cobj = (cc::GFXQueue*)s.nativeThisObject(); SE_PRECONDITION2( cobj, false, "js_gfx_GFXQueue_submit : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); do { if (argc == 1) { - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); if (!ok) { ok = true; break; } cobj->submit(arg0); @@ -17242,10 +17242,10 @@ static bool js_gfx_GFXQueue_submit(se::State& s) do { if (argc == 2) { - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); if (!ok) { ok = true; break; } - cocos2d::GFXFence* arg1 = nullptr; + cc::GFXFence* arg1 = nullptr; ok &= seval_to_native_ptr(args[1], &arg1); if (!ok) { ok = true; break; } cobj->submit(arg0, arg1); @@ -17260,13 +17260,13 @@ SE_BIND_FUNC(js_gfx_GFXQueue_submit) static bool js_gfx_GFXQueue_initialize(se::State& s) { - cocos2d::GFXQueue* cobj = (cocos2d::GFXQueue*)s.nativeThisObject(); + cc::GFXQueue* cobj = (cc::GFXQueue*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXQueue_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::GFXQueueInfo* arg0 = nullptr; + cc::GFXQueueInfo* arg0 = nullptr; ok &= seval_to_reference(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXQueue_initialize : Error processing arguments"); bool result = cobj->initialize(*arg0); @@ -17281,7 +17281,7 @@ SE_BIND_FUNC(js_gfx_GFXQueue_initialize) static bool js_gfx_GFXQueue_destroy(se::State& s) { - cocos2d::GFXQueue* cobj = (cocos2d::GFXQueue*)s.nativeThisObject(); + cc::GFXQueue* cobj = (cc::GFXQueue*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXQueue_destroy : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -17296,13 +17296,13 @@ SE_BIND_FUNC(js_gfx_GFXQueue_destroy) static bool js_gfx_GFXQueue_getDevice(se::State& s) { - cocos2d::GFXQueue* cobj = (cocos2d::GFXQueue*)s.nativeThisObject(); + cc::GFXQueue* cobj = (cc::GFXQueue*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXQueue_getDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 0) { - cocos2d::GFXDevice* result = cobj->getDevice(); + cc::GFXDevice* result = cobj->getDevice(); ok &= native_ptr_to_seval(result, &s.rval()); SE_PRECONDITION2(ok, false, "js_gfx_GFXQueue_getDevice : Error processing arguments"); return true; @@ -17312,49 +17312,49 @@ static bool js_gfx_GFXQueue_getDevice(se::State& s) } SE_BIND_PROP_GET(js_gfx_GFXQueue_getDevice) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GFXQueue_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GFXQueue_finalize) static bool js_gfx_GFXQueue_constructor(se::State& s) { - //#3 cocos2d::GFXQueue: is_skip_construtor True - se::ScriptEngine::getInstance()->evalString("throw new Error(\"cocos2d::GFXQueue constructor is skipped\")"); + //#3 cc::GFXQueue: is_skip_construtor True + se::ScriptEngine::getInstance()->evalString("throw new Error(\"cc::GFXQueue constructor is skipped\")"); return false; } -SE_BIND_CTOR(js_gfx_GFXQueue_constructor, __jsb_cocos2d_GFXQueue_class, js_cocos2d_GFXQueue_finalize) +SE_BIND_CTOR(js_gfx_GFXQueue_constructor, __jsb_cc_GFXQueue_class, js_cc_GFXQueue_finalize) -extern se::Object* __jsb_cocos2d_GFXObject_proto; +extern se::Object* __jsb_cc_GFXObject_proto; -static bool js_cocos2d_GFXQueue_finalize(se::State& s) +static bool js_cc_GFXQueue_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXQueue)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXQueue)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXQueue* cobj = (cocos2d::GFXQueue*)s.nativeThisObject(); + cc::GFXQueue* cobj = (cc::GFXQueue*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GFXQueue_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GFXQueue_finalize) bool js_register_gfx_GFXQueue(se::Object* obj) { - auto cls = se::Class::create("GFXQueue", obj, __jsb_cocos2d_GFXObject_proto, _SE(js_gfx_GFXQueue_constructor)); + auto cls = se::Class::create("GFXQueue", obj, __jsb_cc_GFXObject_proto, _SE(js_gfx_GFXQueue_constructor)); cls->defineProperty("device", _SE(js_gfx_GFXQueue_getDevice), nullptr); cls->defineProperty("type", _SE(js_gfx_GFXQueue_getType), nullptr); cls->defineFunction("submit", _SE(js_gfx_GFXQueue_submit)); cls->defineFunction("initialize", _SE(js_gfx_GFXQueue_initialize)); cls->defineFunction("destroy", _SE(js_gfx_GFXQueue_destroy)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GFXQueue_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GFXQueue_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GFXQueue_proto = cls->getProto(); - __jsb_cocos2d_GFXQueue_class = cls; + __jsb_cc_GFXQueue_proto = cls->getProto(); + __jsb_cc_GFXQueue_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_gfx_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_gfx_auto.hpp index 830b6edcaa..f3425e1e15 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_gfx_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_gfx_auto.hpp @@ -3,275 +3,275 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_GFXOffset_proto; -extern se::Class* __jsb_cocos2d_GFXOffset_class; +extern se::Object* __jsb_cc_GFXOffset_proto; +extern se::Class* __jsb_cc_GFXOffset_class; -bool js_register_cocos2d_GFXOffset(se::Object* obj); +bool js_register_cc_GFXOffset(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXRect_proto; -extern se::Class* __jsb_cocos2d_GFXRect_class; +extern se::Object* __jsb_cc_GFXRect_proto; +extern se::Class* __jsb_cc_GFXRect_class; -bool js_register_cocos2d_GFXRect(se::Object* obj); +bool js_register_cc_GFXRect(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXExtent_proto; -extern se::Class* __jsb_cocos2d_GFXExtent_class; +extern se::Object* __jsb_cc_GFXExtent_proto; +extern se::Class* __jsb_cc_GFXExtent_class; -bool js_register_cocos2d_GFXExtent(se::Object* obj); +bool js_register_cc_GFXExtent(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXTextureSubres_proto; -extern se::Class* __jsb_cocos2d_GFXTextureSubres_class; +extern se::Object* __jsb_cc_GFXTextureSubres_proto; +extern se::Class* __jsb_cc_GFXTextureSubres_class; -bool js_register_cocos2d_GFXTextureSubres(se::Object* obj); +bool js_register_cc_GFXTextureSubres(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXTextureCopy_proto; -extern se::Class* __jsb_cocos2d_GFXTextureCopy_class; +extern se::Object* __jsb_cc_GFXTextureCopy_proto; +extern se::Class* __jsb_cc_GFXTextureCopy_class; -bool js_register_cocos2d_GFXTextureCopy(se::Object* obj); +bool js_register_cc_GFXTextureCopy(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXBufferTextureCopy_proto; -extern se::Class* __jsb_cocos2d_GFXBufferTextureCopy_class; +extern se::Object* __jsb_cc_GFXBufferTextureCopy_proto; +extern se::Class* __jsb_cc_GFXBufferTextureCopy_class; -bool js_register_cocos2d_GFXBufferTextureCopy(se::Object* obj); +bool js_register_cc_GFXBufferTextureCopy(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXViewport_proto; -extern se::Class* __jsb_cocos2d_GFXViewport_class; +extern se::Object* __jsb_cc_GFXViewport_proto; +extern se::Class* __jsb_cc_GFXViewport_class; -bool js_register_cocos2d_GFXViewport(se::Object* obj); +bool js_register_cc_GFXViewport(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXColor_proto; -extern se::Class* __jsb_cocos2d_GFXColor_class; +extern se::Object* __jsb_cc_GFXColor_proto; +extern se::Class* __jsb_cc_GFXColor_class; -bool js_register_cocos2d_GFXColor(se::Object* obj); +bool js_register_cc_GFXColor(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXDeviceInfo_proto; -extern se::Class* __jsb_cocos2d_GFXDeviceInfo_class; +extern se::Object* __jsb_cc_GFXDeviceInfo_proto; +extern se::Class* __jsb_cc_GFXDeviceInfo_class; -bool js_register_cocos2d_GFXDeviceInfo(se::Object* obj); +bool js_register_cc_GFXDeviceInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXContextInfo_proto; -extern se::Class* __jsb_cocos2d_GFXContextInfo_class; +extern se::Object* __jsb_cc_GFXContextInfo_proto; +extern se::Class* __jsb_cc_GFXContextInfo_class; -bool js_register_cocos2d_GFXContextInfo(se::Object* obj); +bool js_register_cc_GFXContextInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXBufferInfo_proto; -extern se::Class* __jsb_cocos2d_GFXBufferInfo_class; +extern se::Object* __jsb_cc_GFXBufferInfo_proto; +extern se::Class* __jsb_cc_GFXBufferInfo_class; -bool js_register_cocos2d_GFXBufferInfo(se::Object* obj); +bool js_register_cc_GFXBufferInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXDrawInfo_proto; -extern se::Class* __jsb_cocos2d_GFXDrawInfo_class; +extern se::Object* __jsb_cc_GFXDrawInfo_proto; +extern se::Class* __jsb_cc_GFXDrawInfo_class; -bool js_register_cocos2d_GFXDrawInfo(se::Object* obj); +bool js_register_cc_GFXDrawInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXIndirectBuffer_proto; -extern se::Class* __jsb_cocos2d_GFXIndirectBuffer_class; +extern se::Object* __jsb_cc_GFXIndirectBuffer_proto; +extern se::Class* __jsb_cc_GFXIndirectBuffer_class; -bool js_register_cocos2d_GFXIndirectBuffer(se::Object* obj); +bool js_register_cc_GFXIndirectBuffer(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXTextureInfo_proto; -extern se::Class* __jsb_cocos2d_GFXTextureInfo_class; +extern se::Object* __jsb_cc_GFXTextureInfo_proto; +extern se::Class* __jsb_cc_GFXTextureInfo_class; -bool js_register_cocos2d_GFXTextureInfo(se::Object* obj); +bool js_register_cc_GFXTextureInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXTextureViewInfo_proto; -extern se::Class* __jsb_cocos2d_GFXTextureViewInfo_class; +extern se::Object* __jsb_cc_GFXTextureViewInfo_proto; +extern se::Class* __jsb_cc_GFXTextureViewInfo_class; -bool js_register_cocos2d_GFXTextureViewInfo(se::Object* obj); +bool js_register_cc_GFXTextureViewInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXSamplerInfo_proto; -extern se::Class* __jsb_cocos2d_GFXSamplerInfo_class; +extern se::Object* __jsb_cc_GFXSamplerInfo_proto; +extern se::Class* __jsb_cc_GFXSamplerInfo_class; -bool js_register_cocos2d_GFXSamplerInfo(se::Object* obj); +bool js_register_cc_GFXSamplerInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXShaderMacro_proto; -extern se::Class* __jsb_cocos2d_GFXShaderMacro_class; +extern se::Object* __jsb_cc_GFXShaderMacro_proto; +extern se::Class* __jsb_cc_GFXShaderMacro_class; -bool js_register_cocos2d_GFXShaderMacro(se::Object* obj); +bool js_register_cc_GFXShaderMacro(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXUniform_proto; -extern se::Class* __jsb_cocos2d_GFXUniform_class; +extern se::Object* __jsb_cc_GFXUniform_proto; +extern se::Class* __jsb_cc_GFXUniform_class; -bool js_register_cocos2d_GFXUniform(se::Object* obj); +bool js_register_cc_GFXUniform(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXUniformBlock_proto; -extern se::Class* __jsb_cocos2d_GFXUniformBlock_class; +extern se::Object* __jsb_cc_GFXUniformBlock_proto; +extern se::Class* __jsb_cc_GFXUniformBlock_class; -bool js_register_cocos2d_GFXUniformBlock(se::Object* obj); +bool js_register_cc_GFXUniformBlock(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXUniformSampler_proto; -extern se::Class* __jsb_cocos2d_GFXUniformSampler_class; +extern se::Object* __jsb_cc_GFXUniformSampler_proto; +extern se::Class* __jsb_cc_GFXUniformSampler_class; -bool js_register_cocos2d_GFXUniformSampler(se::Object* obj); +bool js_register_cc_GFXUniformSampler(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXShaderStage_proto; -extern se::Class* __jsb_cocos2d_GFXShaderStage_class; +extern se::Object* __jsb_cc_GFXShaderStage_proto; +extern se::Class* __jsb_cc_GFXShaderStage_class; -bool js_register_cocos2d_GFXShaderStage(se::Object* obj); +bool js_register_cc_GFXShaderStage(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXAttribute_proto; -extern se::Class* __jsb_cocos2d_GFXAttribute_class; +extern se::Object* __jsb_cc_GFXAttribute_proto; +extern se::Class* __jsb_cc_GFXAttribute_class; -bool js_register_cocos2d_GFXAttribute(se::Object* obj); +bool js_register_cc_GFXAttribute(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXShaderInfo_proto; -extern se::Class* __jsb_cocos2d_GFXShaderInfo_class; +extern se::Object* __jsb_cc_GFXShaderInfo_proto; +extern se::Class* __jsb_cc_GFXShaderInfo_class; -bool js_register_cocos2d_GFXShaderInfo(se::Object* obj); +bool js_register_cc_GFXShaderInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXInputAssemblerInfo_proto; -extern se::Class* __jsb_cocos2d_GFXInputAssemblerInfo_class; +extern se::Object* __jsb_cc_GFXInputAssemblerInfo_proto; +extern se::Class* __jsb_cc_GFXInputAssemblerInfo_class; -bool js_register_cocos2d_GFXInputAssemblerInfo(se::Object* obj); +bool js_register_cc_GFXInputAssemblerInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXColorAttachment_proto; -extern se::Class* __jsb_cocos2d_GFXColorAttachment_class; +extern se::Object* __jsb_cc_GFXColorAttachment_proto; +extern se::Class* __jsb_cc_GFXColorAttachment_class; -bool js_register_cocos2d_GFXColorAttachment(se::Object* obj); +bool js_register_cc_GFXColorAttachment(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXDepthStencilAttachment_proto; -extern se::Class* __jsb_cocos2d_GFXDepthStencilAttachment_class; +extern se::Object* __jsb_cc_GFXDepthStencilAttachment_proto; +extern se::Class* __jsb_cc_GFXDepthStencilAttachment_class; -bool js_register_cocos2d_GFXDepthStencilAttachment(se::Object* obj); +bool js_register_cc_GFXDepthStencilAttachment(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXRenderPassInfo_proto; -extern se::Class* __jsb_cocos2d_GFXRenderPassInfo_class; +extern se::Object* __jsb_cc_GFXRenderPassInfo_proto; +extern se::Class* __jsb_cc_GFXRenderPassInfo_class; -bool js_register_cocos2d_GFXRenderPassInfo(se::Object* obj); +bool js_register_cc_GFXRenderPassInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXFramebufferInfo_proto; -extern se::Class* __jsb_cocos2d_GFXFramebufferInfo_class; +extern se::Object* __jsb_cc_GFXFramebufferInfo_proto; +extern se::Class* __jsb_cc_GFXFramebufferInfo_class; -bool js_register_cocos2d_GFXFramebufferInfo(se::Object* obj); +bool js_register_cc_GFXFramebufferInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXBinding_proto; -extern se::Class* __jsb_cocos2d_GFXBinding_class; +extern se::Object* __jsb_cc_GFXBinding_proto; +extern se::Class* __jsb_cc_GFXBinding_class; -bool js_register_cocos2d_GFXBinding(se::Object* obj); +bool js_register_cc_GFXBinding(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXBindingLayoutInfo_proto; -extern se::Class* __jsb_cocos2d_GFXBindingLayoutInfo_class; +extern se::Object* __jsb_cc_GFXBindingLayoutInfo_proto; +extern se::Class* __jsb_cc_GFXBindingLayoutInfo_class; -bool js_register_cocos2d_GFXBindingLayoutInfo(se::Object* obj); +bool js_register_cc_GFXBindingLayoutInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXBindingUnit_proto; -extern se::Class* __jsb_cocos2d_GFXBindingUnit_class; +extern se::Object* __jsb_cc_GFXBindingUnit_proto; +extern se::Class* __jsb_cc_GFXBindingUnit_class; -bool js_register_cocos2d_GFXBindingUnit(se::Object* obj); +bool js_register_cc_GFXBindingUnit(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXPushConstantRange_proto; -extern se::Class* __jsb_cocos2d_GFXPushConstantRange_class; +extern se::Object* __jsb_cc_GFXPushConstantRange_proto; +extern se::Class* __jsb_cc_GFXPushConstantRange_class; -bool js_register_cocos2d_GFXPushConstantRange(se::Object* obj); +bool js_register_cc_GFXPushConstantRange(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXPipelineLayoutInfo_proto; -extern se::Class* __jsb_cocos2d_GFXPipelineLayoutInfo_class; +extern se::Object* __jsb_cc_GFXPipelineLayoutInfo_proto; +extern se::Class* __jsb_cc_GFXPipelineLayoutInfo_class; -bool js_register_cocos2d_GFXPipelineLayoutInfo(se::Object* obj); +bool js_register_cc_GFXPipelineLayoutInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXInputState_proto; -extern se::Class* __jsb_cocos2d_GFXInputState_class; +extern se::Object* __jsb_cc_GFXInputState_proto; +extern se::Class* __jsb_cc_GFXInputState_class; -bool js_register_cocos2d_GFXInputState(se::Object* obj); +bool js_register_cc_GFXInputState(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXRasterizerState_proto; -extern se::Class* __jsb_cocos2d_GFXRasterizerState_class; +extern se::Object* __jsb_cc_GFXRasterizerState_proto; +extern se::Class* __jsb_cc_GFXRasterizerState_class; -bool js_register_cocos2d_GFXRasterizerState(se::Object* obj); +bool js_register_cc_GFXRasterizerState(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXDepthStencilState_proto; -extern se::Class* __jsb_cocos2d_GFXDepthStencilState_class; +extern se::Object* __jsb_cc_GFXDepthStencilState_proto; +extern se::Class* __jsb_cc_GFXDepthStencilState_class; -bool js_register_cocos2d_GFXDepthStencilState(se::Object* obj); +bool js_register_cc_GFXDepthStencilState(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXBlendTarget_proto; -extern se::Class* __jsb_cocos2d_GFXBlendTarget_class; +extern se::Object* __jsb_cc_GFXBlendTarget_proto; +extern se::Class* __jsb_cc_GFXBlendTarget_class; -bool js_register_cocos2d_GFXBlendTarget(se::Object* obj); +bool js_register_cc_GFXBlendTarget(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXBlendState_proto; -extern se::Class* __jsb_cocos2d_GFXBlendState_class; +extern se::Object* __jsb_cc_GFXBlendState_proto; +extern se::Class* __jsb_cc_GFXBlendState_class; -bool js_register_cocos2d_GFXBlendState(se::Object* obj); +bool js_register_cc_GFXBlendState(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXPipelineStateInfo_proto; -extern se::Class* __jsb_cocos2d_GFXPipelineStateInfo_class; +extern se::Object* __jsb_cc_GFXPipelineStateInfo_proto; +extern se::Class* __jsb_cc_GFXPipelineStateInfo_class; -bool js_register_cocos2d_GFXPipelineStateInfo(se::Object* obj); +bool js_register_cc_GFXPipelineStateInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXCommandBufferInfo_proto; -extern se::Class* __jsb_cocos2d_GFXCommandBufferInfo_class; +extern se::Object* __jsb_cc_GFXCommandBufferInfo_proto; +extern se::Class* __jsb_cc_GFXCommandBufferInfo_class; -bool js_register_cocos2d_GFXCommandBufferInfo(se::Object* obj); +bool js_register_cc_GFXCommandBufferInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXQueueInfo_proto; -extern se::Class* __jsb_cocos2d_GFXQueueInfo_class; +extern se::Object* __jsb_cc_GFXQueueInfo_proto; +extern se::Class* __jsb_cc_GFXQueueInfo_class; -bool js_register_cocos2d_GFXQueueInfo(se::Object* obj); +bool js_register_cc_GFXQueueInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXFormatInfo_proto; -extern se::Class* __jsb_cocos2d_GFXFormatInfo_class; +extern se::Object* __jsb_cc_GFXFormatInfo_proto; +extern se::Class* __jsb_cc_GFXFormatInfo_class; -bool js_register_cocos2d_GFXFormatInfo(se::Object* obj); +bool js_register_cc_GFXFormatInfo(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXMemoryStatus_proto; -extern se::Class* __jsb_cocos2d_GFXMemoryStatus_class; +extern se::Object* __jsb_cc_GFXMemoryStatus_proto; +extern se::Class* __jsb_cc_GFXMemoryStatus_class; -bool js_register_cocos2d_GFXMemoryStatus(se::Object* obj); +bool js_register_cc_GFXMemoryStatus(se::Object* obj); bool register_all_gfx(se::Object* obj); -extern se::Object* __jsb_cocos2d_GFXObject_proto; -extern se::Class* __jsb_cocos2d_GFXObject_class; +extern se::Object* __jsb_cc_GFXObject_proto; +extern se::Class* __jsb_cc_GFXObject_class; -bool js_register_cocos2d_GFXObject(se::Object* obj); +bool js_register_cc_GFXObject(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXObject_GFXObject); -extern se::Object* __jsb_cocos2d_GFXDevice_proto; -extern se::Class* __jsb_cocos2d_GFXDevice_class; +extern se::Object* __jsb_cc_GFXDevice_proto; +extern se::Class* __jsb_cc_GFXDevice_class; -bool js_register_cocos2d_GFXDevice(se::Object* obj); +bool js_register_cc_GFXDevice(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXDevice_hasFeature); SE_DECLARE_FUNC(js_gfx_GFXDevice_createFence); @@ -294,74 +294,74 @@ SE_DECLARE_FUNC(js_gfx_GFXDevice_resize); SE_DECLARE_FUNC(js_gfx_GFXDevice_createQueue); SE_DECLARE_FUNC(js_gfx_GFXDevice_createBindingLayout); -extern se::Object* __jsb_cocos2d_GFXBuffer_proto; -extern se::Class* __jsb_cocos2d_GFXBuffer_class; +extern se::Object* __jsb_cc_GFXBuffer_proto; +extern se::Class* __jsb_cc_GFXBuffer_class; -bool js_register_cocos2d_GFXBuffer(se::Object* obj); +bool js_register_cc_GFXBuffer(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXBuffer_initialize); SE_DECLARE_FUNC(js_gfx_GFXBuffer_destroy); SE_DECLARE_FUNC(js_gfx_GFXBuffer_resize); SE_DECLARE_FUNC(js_gfx_GFXBuffer_GFXBuffer); -extern se::Object* __jsb_cocos2d_GFXTexture_proto; -extern se::Class* __jsb_cocos2d_GFXTexture_class; +extern se::Object* __jsb_cc_GFXTexture_proto; +extern se::Class* __jsb_cc_GFXTexture_class; -bool js_register_cocos2d_GFXTexture(se::Object* obj); +bool js_register_cc_GFXTexture(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXTexture_destroy); SE_DECLARE_FUNC(js_gfx_GFXTexture_resize); SE_DECLARE_FUNC(js_gfx_GFXTexture_GFXTexture); -extern se::Object* __jsb_cocos2d_GFXSampler_proto; -extern se::Class* __jsb_cocos2d_GFXSampler_class; +extern se::Object* __jsb_cc_GFXSampler_proto; +extern se::Class* __jsb_cc_GFXSampler_class; -bool js_register_cocos2d_GFXSampler(se::Object* obj); +bool js_register_cc_GFXSampler(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXSampler_initialize); SE_DECLARE_FUNC(js_gfx_GFXSampler_destroy); SE_DECLARE_FUNC(js_gfx_GFXSampler_GFXSampler); -extern se::Object* __jsb_cocos2d_GFXShader_proto; -extern se::Class* __jsb_cocos2d_GFXShader_class; +extern se::Object* __jsb_cc_GFXShader_proto; +extern se::Class* __jsb_cc_GFXShader_class; -bool js_register_cocos2d_GFXShader(se::Object* obj); +bool js_register_cc_GFXShader(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXShader_initialize); SE_DECLARE_FUNC(js_gfx_GFXShader_destroy); SE_DECLARE_FUNC(js_gfx_GFXShader_GFXShader); -extern se::Object* __jsb_cocos2d_GFXInputAssembler_proto; -extern se::Class* __jsb_cocos2d_GFXInputAssembler_class; +extern se::Object* __jsb_cc_GFXInputAssembler_proto; +extern se::Class* __jsb_cc_GFXInputAssembler_class; -bool js_register_cocos2d_GFXInputAssembler(se::Object* obj); +bool js_register_cc_GFXInputAssembler(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXInputAssembler_destroy); SE_DECLARE_FUNC(js_gfx_GFXInputAssembler_initialize); SE_DECLARE_FUNC(js_gfx_GFXInputAssembler_GFXInputAssembler); -extern se::Object* __jsb_cocos2d_GFXRenderPass_proto; -extern se::Class* __jsb_cocos2d_GFXRenderPass_class; +extern se::Object* __jsb_cc_GFXRenderPass_proto; +extern se::Class* __jsb_cc_GFXRenderPass_class; -bool js_register_cocos2d_GFXRenderPass(se::Object* obj); +bool js_register_cc_GFXRenderPass(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXRenderPass_initialize); SE_DECLARE_FUNC(js_gfx_GFXRenderPass_destroy); SE_DECLARE_FUNC(js_gfx_GFXRenderPass_GFXRenderPass); -extern se::Object* __jsb_cocos2d_GFXFramebuffer_proto; -extern se::Class* __jsb_cocos2d_GFXFramebuffer_class; +extern se::Object* __jsb_cc_GFXFramebuffer_proto; +extern se::Class* __jsb_cc_GFXFramebuffer_class; -bool js_register_cocos2d_GFXFramebuffer(se::Object* obj); +bool js_register_cc_GFXFramebuffer(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXFramebuffer_initialize); SE_DECLARE_FUNC(js_gfx_GFXFramebuffer_destroy); SE_DECLARE_FUNC(js_gfx_GFXFramebuffer_GFXFramebuffer); -extern se::Object* __jsb_cocos2d_GFXBindingLayout_proto; -extern se::Class* __jsb_cocos2d_GFXBindingLayout_class; +extern se::Object* __jsb_cc_GFXBindingLayout_proto; +extern se::Class* __jsb_cc_GFXBindingLayout_class; -bool js_register_cocos2d_GFXBindingLayout(se::Object* obj); +bool js_register_cc_GFXBindingLayout(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXBindingLayout_bindBuffer); SE_DECLARE_FUNC(js_gfx_GFXBindingLayout_bindSampler); @@ -371,10 +371,10 @@ SE_DECLARE_FUNC(js_gfx_GFXBindingLayout_initialize); SE_DECLARE_FUNC(js_gfx_GFXBindingLayout_destroy); SE_DECLARE_FUNC(js_gfx_GFXBindingLayout_GFXBindingLayout); -extern se::Object* __jsb_cocos2d_GFXPipelineLayout_proto; -extern se::Class* __jsb_cocos2d_GFXPipelineLayout_class; +extern se::Object* __jsb_cc_GFXPipelineLayout_proto; +extern se::Class* __jsb_cc_GFXPipelineLayout_class; -bool js_register_cocos2d_GFXPipelineLayout(se::Object* obj); +bool js_register_cc_GFXPipelineLayout(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXPipelineLayout_getLayouts); SE_DECLARE_FUNC(js_gfx_GFXPipelineLayout_initialize); @@ -382,30 +382,30 @@ SE_DECLARE_FUNC(js_gfx_GFXPipelineLayout_destroy); SE_DECLARE_FUNC(js_gfx_GFXPipelineLayout_getPushConstantsRanges); SE_DECLARE_FUNC(js_gfx_GFXPipelineLayout_GFXPipelineLayout); -extern se::Object* __jsb_cocos2d_GFXPipelineState_proto; -extern se::Class* __jsb_cocos2d_GFXPipelineState_class; +extern se::Object* __jsb_cc_GFXPipelineState_proto; +extern se::Class* __jsb_cc_GFXPipelineState_class; -bool js_register_cocos2d_GFXPipelineState(se::Object* obj); +bool js_register_cc_GFXPipelineState(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXPipelineState_initialize); SE_DECLARE_FUNC(js_gfx_GFXPipelineState_destroy); SE_DECLARE_FUNC(js_gfx_GFXPipelineState_getDynamicStates); SE_DECLARE_FUNC(js_gfx_GFXPipelineState_GFXPipelineState); -extern se::Object* __jsb_cocos2d_GFXCommandAllocator_proto; -extern se::Class* __jsb_cocos2d_GFXCommandAllocator_class; +extern se::Object* __jsb_cc_GFXCommandAllocator_proto; +extern se::Class* __jsb_cc_GFXCommandAllocator_class; -bool js_register_cocos2d_GFXCommandAllocator(se::Object* obj); +bool js_register_cc_GFXCommandAllocator(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXCommandAllocator_initialize); SE_DECLARE_FUNC(js_gfx_GFXCommandAllocator_destroy); SE_DECLARE_FUNC(js_gfx_GFXCommandAllocator_getDevice); SE_DECLARE_FUNC(js_gfx_GFXCommandAllocator_GFXCommandAllocator); -extern se::Object* __jsb_cocos2d_GFXCommandBuffer_proto; -extern se::Class* __jsb_cocos2d_GFXCommandBuffer_class; +extern se::Object* __jsb_cc_GFXCommandBuffer_proto; +extern se::Class* __jsb_cc_GFXCommandBuffer_class; -bool js_register_cocos2d_GFXCommandBuffer(se::Object* obj); +bool js_register_cc_GFXCommandBuffer(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXCommandBuffer_draw); SE_DECLARE_FUNC(js_gfx_GFXCommandBuffer_setBlendConstants); @@ -435,10 +435,10 @@ SE_DECLARE_FUNC(js_gfx_GFXCommandBuffer_beginRenderPass); SE_DECLARE_FUNC(js_gfx_GFXCommandBuffer_getNumDrawCalls); SE_DECLARE_FUNC(js_gfx_GFXCommandBuffer_GFXCommandBuffer); -extern se::Object* __jsb_cocos2d_GFXFence_proto; -extern se::Class* __jsb_cocos2d_GFXFence_class; +extern se::Object* __jsb_cc_GFXFence_proto; +extern se::Class* __jsb_cc_GFXFence_class; -bool js_register_cocos2d_GFXFence(se::Object* obj); +bool js_register_cc_GFXFence(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXFence_initialize); SE_DECLARE_FUNC(js_gfx_GFXFence_destroy); @@ -446,10 +446,10 @@ SE_DECLARE_FUNC(js_gfx_GFXFence_wait); SE_DECLARE_FUNC(js_gfx_GFXFence_reset); SE_DECLARE_FUNC(js_gfx_GFXFence_GFXFence); -extern se::Object* __jsb_cocos2d_GFXQueue_proto; -extern se::Class* __jsb_cocos2d_GFXQueue_class; +extern se::Object* __jsb_cc_GFXQueue_proto; +extern se::Class* __jsb_cc_GFXQueue_class; -bool js_register_cocos2d_GFXQueue(se::Object* obj); +bool js_register_cc_GFXQueue(se::Object* obj); bool register_all_gfx(se::Object* obj); SE_DECLARE_FUNC(js_gfx_GFXQueue_submit); SE_DECLARE_FUNC(js_gfx_GFXQueue_initialize); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_gles2_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_gles2_auto.cpp index f62f67693f..66eeb20aea 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_gles2_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_gles2_auto.cpp @@ -10,18 +10,18 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_GLES2Device_proto = nullptr; -se::Class* __jsb_cocos2d_GLES2Device_class = nullptr; +se::Object* __jsb_cc_GLES2Device_proto = nullptr; +se::Class* __jsb_cc_GLES2Device_class = nullptr; static bool js_gles2_GLES2Device_checkExtension(se::State& s) { - cocos2d::GLES2Device* cobj = (cocos2d::GLES2Device*)s.nativeThisObject(); + cc::GLES2Device* cobj = (cc::GLES2Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gles2_GLES2Device_checkExtension : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gles2_GLES2Device_checkExtension : Error processing arguments"); bool result = cobj->checkExtension(arg0); @@ -36,7 +36,7 @@ SE_BIND_FUNC(js_gles2_GLES2Device_checkExtension) static bool js_gles2_GLES2Device_useInstancedArrays(se::State& s) { - cocos2d::GLES2Device* cobj = (cocos2d::GLES2Device*)s.nativeThisObject(); + cc::GLES2Device* cobj = (cc::GLES2Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gles2_GLES2Device_useInstancedArrays : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -54,7 +54,7 @@ SE_BIND_FUNC(js_gles2_GLES2Device_useInstancedArrays) static bool js_gles2_GLES2Device_useVAO(se::State& s) { - cocos2d::GLES2Device* cobj = (cocos2d::GLES2Device*)s.nativeThisObject(); + cc::GLES2Device* cobj = (cc::GLES2Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gles2_GLES2Device_useVAO : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -72,7 +72,7 @@ SE_BIND_FUNC(js_gles2_GLES2Device_useVAO) static bool js_gles2_GLES2Device_useDrawInstanced(se::State& s) { - cocos2d::GLES2Device* cobj = (cocos2d::GLES2Device*)s.nativeThisObject(); + cc::GLES2Device* cobj = (cc::GLES2Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gles2_GLES2Device_useDrawInstanced : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -90,7 +90,7 @@ SE_BIND_FUNC(js_gles2_GLES2Device_useDrawInstanced) static bool js_gles2_GLES2Device_useDiscardFramebuffer(se::State& s) { - cocos2d::GLES2Device* cobj = (cocos2d::GLES2Device*)s.nativeThisObject(); + cc::GLES2Device* cobj = (cc::GLES2Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gles2_GLES2Device_useDiscardFramebuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -106,50 +106,50 @@ static bool js_gles2_GLES2Device_useDiscardFramebuffer(se::State& s) } SE_BIND_FUNC(js_gles2_GLES2Device_useDiscardFramebuffer) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GLES2Device_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GLES2Device_finalize) static bool js_gles2_GLES2Device_constructor(se::State& s) { - cocos2d::GLES2Device* cobj = JSB_ALLOC(cocos2d::GLES2Device); + cc::GLES2Device* cobj = JSB_ALLOC(cc::GLES2Device); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } -SE_BIND_CTOR(js_gles2_GLES2Device_constructor, __jsb_cocos2d_GLES2Device_class, js_cocos2d_GLES2Device_finalize) +SE_BIND_CTOR(js_gles2_GLES2Device_constructor, __jsb_cc_GLES2Device_class, js_cc_GLES2Device_finalize) -extern se::Object* __jsb_cocos2d_GFXDevice_proto; +extern se::Object* __jsb_cc_GFXDevice_proto; -static bool js_cocos2d_GLES2Device_finalize(se::State& s) +static bool js_cc_GLES2Device_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GLES2Device)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GLES2Device)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GLES2Device* cobj = (cocos2d::GLES2Device*)s.nativeThisObject(); + cc::GLES2Device* cobj = (cc::GLES2Device*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GLES2Device_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GLES2Device_finalize) bool js_register_gles2_GLES2Device(se::Object* obj) { - auto cls = se::Class::create("GLES2Device", obj, __jsb_cocos2d_GFXDevice_proto, _SE(js_gles2_GLES2Device_constructor)); + auto cls = se::Class::create("GLES2Device", obj, __jsb_cc_GFXDevice_proto, _SE(js_gles2_GLES2Device_constructor)); cls->defineFunction("checkExtension", _SE(js_gles2_GLES2Device_checkExtension)); cls->defineFunction("useInstancedArrays", _SE(js_gles2_GLES2Device_useInstancedArrays)); cls->defineFunction("useVAO", _SE(js_gles2_GLES2Device_useVAO)); cls->defineFunction("useDrawInstanced", _SE(js_gles2_GLES2Device_useDrawInstanced)); cls->defineFunction("useDiscardFramebuffer", _SE(js_gles2_GLES2Device_useDiscardFramebuffer)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GLES2Device_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GLES2Device_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GLES2Device_proto = cls->getProto(); - __jsb_cocos2d_GLES2Device_class = cls; + __jsb_cc_GLES2Device_proto = cls->getProto(); + __jsb_cc_GLES2Device_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_gles2_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_gles2_auto.hpp index 080af996df..372690f9c9 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_gles2_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_gles2_auto.hpp @@ -3,10 +3,10 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_GLES2Device_proto; -extern se::Class* __jsb_cocos2d_GLES2Device_class; +extern se::Object* __jsb_cc_GLES2Device_proto; +extern se::Class* __jsb_cc_GLES2Device_class; -bool js_register_cocos2d_GLES2Device(se::Object* obj); +bool js_register_cc_GLES2Device(se::Object* obj); bool register_all_gles2(se::Object* obj); SE_DECLARE_FUNC(js_gles2_GLES2Device_checkExtension); SE_DECLARE_FUNC(js_gles2_GLES2Device_useInstancedArrays); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_gles3_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_gles3_auto.cpp index 06c5d8ba2a..af6fcc2efc 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_gles3_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_gles3_auto.cpp @@ -10,18 +10,18 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_GLES3Device_proto = nullptr; -se::Class* __jsb_cocos2d_GLES3Device_class = nullptr; +se::Object* __jsb_cc_GLES3Device_proto = nullptr; +se::Class* __jsb_cc_GLES3Device_class = nullptr; static bool js_gles3_GLES3Device_checkExtension(se::State& s) { - cocos2d::GLES3Device* cobj = (cocos2d::GLES3Device*)s.nativeThisObject(); + cc::GLES3Device* cobj = (cc::GLES3Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gles3_GLES3Device_checkExtension : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_gles3_GLES3Device_checkExtension : Error processing arguments"); bool result = cobj->checkExtension(arg0); @@ -36,7 +36,7 @@ SE_BIND_FUNC(js_gles3_GLES3Device_checkExtension) static bool js_gles3_GLES3Device_useVAO(se::State& s) { - cocos2d::GLES3Device* cobj = (cocos2d::GLES3Device*)s.nativeThisObject(); + cc::GLES3Device* cobj = (cc::GLES3Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gles3_GLES3Device_useVAO : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -52,47 +52,47 @@ static bool js_gles3_GLES3Device_useVAO(se::State& s) } SE_BIND_FUNC(js_gles3_GLES3Device_useVAO) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_GLES3Device_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_GLES3Device_finalize) static bool js_gles3_GLES3Device_constructor(se::State& s) { - cocos2d::GLES3Device* cobj = JSB_ALLOC(cocos2d::GLES3Device); + cc::GLES3Device* cobj = JSB_ALLOC(cc::GLES3Device); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } -SE_BIND_CTOR(js_gles3_GLES3Device_constructor, __jsb_cocos2d_GLES3Device_class, js_cocos2d_GLES3Device_finalize) +SE_BIND_CTOR(js_gles3_GLES3Device_constructor, __jsb_cc_GLES3Device_class, js_cc_GLES3Device_finalize) -extern se::Object* __jsb_cocos2d_GFXDevice_proto; +extern se::Object* __jsb_cc_GFXDevice_proto; -static bool js_cocos2d_GLES3Device_finalize(se::State& s) +static bool js_cc_GLES3Device_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GLES3Device)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GLES3Device)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GLES3Device* cobj = (cocos2d::GLES3Device*)s.nativeThisObject(); + cc::GLES3Device* cobj = (cc::GLES3Device*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_GLES3Device_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_GLES3Device_finalize) bool js_register_gles3_GLES3Device(se::Object* obj) { - auto cls = se::Class::create("GLES3Device", obj, __jsb_cocos2d_GFXDevice_proto, _SE(js_gles3_GLES3Device_constructor)); + auto cls = se::Class::create("GLES3Device", obj, __jsb_cc_GFXDevice_proto, _SE(js_gles3_GLES3Device_constructor)); cls->defineFunction("checkExtension", _SE(js_gles3_GLES3Device_checkExtension)); cls->defineFunction("useVAO", _SE(js_gles3_GLES3Device_useVAO)); - cls->defineFinalizeFunction(_SE(js_cocos2d_GLES3Device_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_GLES3Device_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_GLES3Device_proto = cls->getProto(); - __jsb_cocos2d_GLES3Device_class = cls; + __jsb_cc_GLES3Device_proto = cls->getProto(); + __jsb_cc_GLES3Device_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_gles3_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_gles3_auto.hpp index bb8c135c61..a1c58f75d2 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_gles3_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_gles3_auto.hpp @@ -3,10 +3,10 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_GLES3Device_proto; -extern se::Class* __jsb_cocos2d_GLES3Device_class; +extern se::Object* __jsb_cc_GLES3Device_proto; +extern se::Class* __jsb_cc_GLES3Device_class; -bool js_register_cocos2d_GLES3Device(se::Object* obj); +bool js_register_cc_GLES3Device(se::Object* obj); bool register_all_gles3(se::Object* obj); SE_DECLARE_FUNC(js_gles3_GLES3Device_checkExtension); SE_DECLARE_FUNC(js_gles3_GLES3Device_useVAO); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_mtl_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_mtl_auto.cpp index f119258289..4b6593050d 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_mtl_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_mtl_auto.cpp @@ -10,12 +10,12 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_CCMTLDevice_proto = nullptr; -se::Class* __jsb_cocos2d_CCMTLDevice_class = nullptr; +se::Object* __jsb_cc_CCMTLDevice_proto = nullptr; +se::Class* __jsb_cc_CCMTLDevice_class = nullptr; static bool js_mtl_CCMTLDevice_getMTLDevice(se::State& s) { - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_mtl_CCMTLDevice_getMTLDevice : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -33,7 +33,7 @@ SE_BIND_FUNC(js_mtl_CCMTLDevice_getMTLDevice) static bool js_mtl_CCMTLDevice_getMTKView(se::State& s) { - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_mtl_CCMTLDevice_getMTKView : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -51,7 +51,7 @@ SE_BIND_FUNC(js_mtl_CCMTLDevice_getMTKView) static bool js_mtl_CCMTLDevice_getMaximumSamplerUnits(se::State& s) { - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_mtl_CCMTLDevice_getMaximumSamplerUnits : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -69,7 +69,7 @@ SE_BIND_FUNC(js_mtl_CCMTLDevice_getMaximumSamplerUnits) static bool js_mtl_CCMTLDevice_getMaximumColorRenderTargets(se::State& s) { - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_mtl_CCMTLDevice_getMaximumColorRenderTargets : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -87,7 +87,7 @@ SE_BIND_FUNC(js_mtl_CCMTLDevice_getMaximumColorRenderTargets) static bool js_mtl_CCMTLDevice_isIndirectCommandBufferSupported(se::State& s) { - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_mtl_CCMTLDevice_isIndirectCommandBufferSupported : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -105,7 +105,7 @@ SE_BIND_FUNC(js_mtl_CCMTLDevice_isIndirectCommandBufferSupported) static bool js_mtl_CCMTLDevice_blitBuffer(se::State& s) { - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_mtl_CCMTLDevice_blitBuffer : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -128,38 +128,38 @@ static bool js_mtl_CCMTLDevice_blitBuffer(se::State& s) } SE_BIND_FUNC(js_mtl_CCMTLDevice_blitBuffer) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_CCMTLDevice_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_CCMTLDevice_finalize) static bool js_mtl_CCMTLDevice_constructor(se::State& s) { - cocos2d::CCMTLDevice* cobj = JSB_ALLOC(cocos2d::CCMTLDevice); + cc::CCMTLDevice* cobj = JSB_ALLOC(cc::CCMTLDevice); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } -SE_BIND_CTOR(js_mtl_CCMTLDevice_constructor, __jsb_cocos2d_CCMTLDevice_class, js_cocos2d_CCMTLDevice_finalize) +SE_BIND_CTOR(js_mtl_CCMTLDevice_constructor, __jsb_cc_CCMTLDevice_class, js_cc_CCMTLDevice_finalize) -extern se::Object* __jsb_cocos2d_GFXDevice_proto; +extern se::Object* __jsb_cc_GFXDevice_proto; -static bool js_cocos2d_CCMTLDevice_finalize(se::State& s) +static bool js_cc_CCMTLDevice_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::CCMTLDevice)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::CCMTLDevice)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_CCMTLDevice_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_CCMTLDevice_finalize) bool js_register_mtl_CCMTLDevice(se::Object* obj) { - auto cls = se::Class::create("CCMTLDevice", obj, __jsb_cocos2d_GFXDevice_proto, _SE(js_mtl_CCMTLDevice_constructor)); + auto cls = se::Class::create("CCMTLDevice", obj, __jsb_cc_GFXDevice_proto, _SE(js_mtl_CCMTLDevice_constructor)); cls->defineFunction("getMTLDevice", _SE(js_mtl_CCMTLDevice_getMTLDevice)); cls->defineFunction("getMTKView", _SE(js_mtl_CCMTLDevice_getMTKView)); @@ -167,12 +167,12 @@ bool js_register_mtl_CCMTLDevice(se::Object* obj) cls->defineFunction("getMaximumColorRenderTargets", _SE(js_mtl_CCMTLDevice_getMaximumColorRenderTargets)); cls->defineFunction("isIndirectCommandBufferSupported", _SE(js_mtl_CCMTLDevice_isIndirectCommandBufferSupported)); cls->defineFunction("blitBuffer", _SE(js_mtl_CCMTLDevice_blitBuffer)); - cls->defineFinalizeFunction(_SE(js_cocos2d_CCMTLDevice_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_CCMTLDevice_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_CCMTLDevice_proto = cls->getProto(); - __jsb_cocos2d_CCMTLDevice_class = cls; + __jsb_cc_CCMTLDevice_proto = cls->getProto(); + __jsb_cc_CCMTLDevice_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_mtl_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_mtl_auto.hpp index 65acaa7a02..918f3f6c11 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_mtl_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_mtl_auto.hpp @@ -3,10 +3,10 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_CCMTLDevice_proto; -extern se::Class* __jsb_cocos2d_CCMTLDevice_class; +extern se::Object* __jsb_cc_CCMTLDevice_proto; +extern se::Class* __jsb_cc_CCMTLDevice_class; -bool js_register_cocos2d_CCMTLDevice(se::Object* obj); +bool js_register_cc_CCMTLDevice(se::Object* obj); bool register_all_mtl(se::Object* obj); SE_DECLARE_FUNC(js_mtl_CCMTLDevice_getMTLDevice); SE_DECLARE_FUNC(js_mtl_CCMTLDevice_getMTKView); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_video_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_video_auto.cpp index 4b4bf6af21..f5497fc25e 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_video_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_video_auto.cpp @@ -11,12 +11,12 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_VideoPlayer_proto = nullptr; -se::Class* __jsb_cocos2d_VideoPlayer_class = nullptr; +se::Object* __jsb_cc_VideoPlayer_proto = nullptr; +se::Class* __jsb_cc_VideoPlayer_class = nullptr; static bool js_video_VideoPlayer_setFrame(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setFrame : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -41,7 +41,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_setFrame) static bool js_video_VideoPlayer_play(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_play : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -56,7 +56,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_play) static bool js_video_VideoPlayer_pause(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_pause : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -71,7 +71,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_pause) static bool js_video_VideoPlayer_setKeepAspectRatioEnabled(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setKeepAspectRatioEnabled : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -90,7 +90,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_setKeepAspectRatioEnabled) static bool js_video_VideoPlayer_currentTime(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_currentTime : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -108,7 +108,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_currentTime) static bool js_video_VideoPlayer_setFullScreenEnabled(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setFullScreenEnabled : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -127,7 +127,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_setFullScreenEnabled) static bool js_video_VideoPlayer_addEventListener(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_addEventListener : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -173,7 +173,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_addEventListener) static bool js_video_VideoPlayer_stop(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_stop : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -188,7 +188,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_stop) static bool js_video_VideoPlayer_setURL(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setURL : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -207,7 +207,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_setURL) static bool js_video_VideoPlayer_isKeepAspectRatioEnabled(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_isKeepAspectRatioEnabled : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -225,7 +225,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_isKeepAspectRatioEnabled) static bool js_video_VideoPlayer_onPlayEvent(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_onPlayEvent : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -244,7 +244,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_onPlayEvent) static bool js_video_VideoPlayer_duration(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_duration : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -262,7 +262,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_duration) static bool js_video_VideoPlayer_setVisible(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setVisible : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -281,7 +281,7 @@ SE_BIND_FUNC(js_video_VideoPlayer_setVisible) static bool js_video_VideoPlayer_seekTo(se::State& s) { - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_seekTo : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -298,27 +298,27 @@ static bool js_video_VideoPlayer_seekTo(se::State& s) } SE_BIND_FUNC(js_video_VideoPlayer_seekTo) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_VideoPlayer_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_VideoPlayer_finalize) static bool js_video_VideoPlayer_constructor(se::State& s) { - cocos2d::VideoPlayer* cobj = JSB_ALLOC(cocos2d::VideoPlayer); + cc::VideoPlayer* cobj = JSB_ALLOC(cc::VideoPlayer); s.thisObject()->setPrivateData(cobj); return true; } -SE_BIND_CTOR(js_video_VideoPlayer_constructor, __jsb_cocos2d_VideoPlayer_class, js_cocos2d_VideoPlayer_finalize) +SE_BIND_CTOR(js_video_VideoPlayer_constructor, __jsb_cc_VideoPlayer_class, js_cc_VideoPlayer_finalize) -static bool js_cocos2d_VideoPlayer_finalize(se::State& s) +static bool js_cc_VideoPlayer_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::VideoPlayer)", s.nativeThisObject()); - cocos2d::VideoPlayer* cobj = (cocos2d::VideoPlayer*)s.nativeThisObject(); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::VideoPlayer)", s.nativeThisObject()); + cc::VideoPlayer* cobj = (cc::VideoPlayer*)s.nativeThisObject(); cobj->release(); return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_VideoPlayer_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_VideoPlayer_finalize) bool js_register_video_VideoPlayer(se::Object* obj) { @@ -338,12 +338,12 @@ bool js_register_video_VideoPlayer(se::Object* obj) cls->defineFunction("duration", _SE(js_video_VideoPlayer_duration)); cls->defineFunction("setVisible", _SE(js_video_VideoPlayer_setVisible)); cls->defineFunction("seekTo", _SE(js_video_VideoPlayer_seekTo)); - cls->defineFinalizeFunction(_SE(js_cocos2d_VideoPlayer_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_VideoPlayer_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_VideoPlayer_proto = cls->getProto(); - __jsb_cocos2d_VideoPlayer_class = cls; + __jsb_cc_VideoPlayer_proto = cls->getProto(); + __jsb_cc_VideoPlayer_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_video_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_video_auto.hpp index ffbcbe1e02..3dbd5da453 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_video_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_video_auto.hpp @@ -4,10 +4,10 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_VideoPlayer_proto; -extern se::Class* __jsb_cocos2d_VideoPlayer_class; +extern se::Object* __jsb_cc_VideoPlayer_proto; +extern se::Class* __jsb_cc_VideoPlayer_class; -bool js_register_cocos2d_VideoPlayer(se::Object* obj); +bool js_register_cc_VideoPlayer(se::Object* obj); bool register_all_video(se::Object* obj); SE_DECLARE_FUNC(js_video_VideoPlayer_setFrame); SE_DECLARE_FUNC(js_video_VideoPlayer_play); diff --git a/native/cocos/scripting/js-bindings/auto/jsb_vk_auto.cpp b/native/cocos/scripting/js-bindings/auto/jsb_vk_auto.cpp index 1f5831a7df..596be3ddae 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_vk_auto.cpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_vk_auto.cpp @@ -10,18 +10,18 @@ #ifndef JSB_FREE #define JSB_FREE(ptr) delete ptr #endif -se::Object* __jsb_cocos2d_CCVKDevice_proto = nullptr; -se::Class* __jsb_cocos2d_CCVKDevice_class = nullptr; +se::Object* __jsb_cc_CCVKDevice_proto = nullptr; +se::Class* __jsb_cc_CCVKDevice_class = nullptr; static bool js_vk_CCVKDevice_checkExtension(se::State& s) { - cocos2d::CCVKDevice* cobj = (cocos2d::CCVKDevice*)s.nativeThisObject(); + cc::CCVKDevice* cobj = (cc::CCVKDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_vk_CCVKDevice_checkExtension : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - cocos2d::String arg0; + cc::String arg0; arg0 = args[0].toStringForce().c_str(); SE_PRECONDITION2(ok, false, "js_vk_CCVKDevice_checkExtension : Error processing arguments"); bool result = cobj->checkExtension(arg0); @@ -34,46 +34,46 @@ static bool js_vk_CCVKDevice_checkExtension(se::State& s) } SE_BIND_FUNC(js_vk_CCVKDevice_checkExtension) -SE_DECLARE_FINALIZE_FUNC(js_cocos2d_CCVKDevice_finalize) +SE_DECLARE_FINALIZE_FUNC(js_cc_CCVKDevice_finalize) static bool js_vk_CCVKDevice_constructor(se::State& s) { - cocos2d::CCVKDevice* cobj = JSB_ALLOC(cocos2d::CCVKDevice); + cc::CCVKDevice* cobj = JSB_ALLOC(cc::CCVKDevice); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; } -SE_BIND_CTOR(js_vk_CCVKDevice_constructor, __jsb_cocos2d_CCVKDevice_class, js_cocos2d_CCVKDevice_finalize) +SE_BIND_CTOR(js_vk_CCVKDevice_constructor, __jsb_cc_CCVKDevice_class, js_cc_CCVKDevice_finalize) -extern se::Object* __jsb_cocos2d_GFXDevice_proto; +extern se::Object* __jsb_cc_GFXDevice_proto; -static bool js_cocos2d_CCVKDevice_finalize(se::State& s) +static bool js_cc_CCVKDevice_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::CCVKDevice)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::CCVKDevice)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::CCVKDevice* cobj = (cocos2d::CCVKDevice*)s.nativeThisObject(); + cc::CCVKDevice* cobj = (cc::CCVKDevice*)s.nativeThisObject(); JSB_FREE(cobj); } return true; } -SE_BIND_FINALIZE_FUNC(js_cocos2d_CCVKDevice_finalize) +SE_BIND_FINALIZE_FUNC(js_cc_CCVKDevice_finalize) bool js_register_vk_CCVKDevice(se::Object* obj) { - auto cls = se::Class::create("CCVKDevice", obj, __jsb_cocos2d_GFXDevice_proto, _SE(js_vk_CCVKDevice_constructor)); + auto cls = se::Class::create("CCVKDevice", obj, __jsb_cc_GFXDevice_proto, _SE(js_vk_CCVKDevice_constructor)); cls->defineFunction("checkExtension", _SE(js_vk_CCVKDevice_checkExtension)); - cls->defineFinalizeFunction(_SE(js_cocos2d_CCVKDevice_finalize)); + cls->defineFinalizeFunction(_SE(js_cc_CCVKDevice_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); - __jsb_cocos2d_CCVKDevice_proto = cls->getProto(); - __jsb_cocos2d_CCVKDevice_class = cls; + __jsb_cc_CCVKDevice_proto = cls->getProto(); + __jsb_cc_CCVKDevice_class = cls; se::ScriptEngine::getInstance()->clearException(); return true; diff --git a/native/cocos/scripting/js-bindings/auto/jsb_vk_auto.hpp b/native/cocos/scripting/js-bindings/auto/jsb_vk_auto.hpp index a0a97fa9ae..658c900c1e 100644 --- a/native/cocos/scripting/js-bindings/auto/jsb_vk_auto.hpp +++ b/native/cocos/scripting/js-bindings/auto/jsb_vk_auto.hpp @@ -3,10 +3,10 @@ #include "cocos/scripting/js-bindings/jswrapper/SeApi.h" -extern se::Object* __jsb_cocos2d_CCVKDevice_proto; -extern se::Class* __jsb_cocos2d_CCVKDevice_class; +extern se::Object* __jsb_cc_CCVKDevice_proto; +extern se::Class* __jsb_cc_CCVKDevice_class; -bool js_register_cocos2d_CCVKDevice(se::Object* obj); +bool js_register_cc_CCVKDevice(se::Object* obj); bool register_all_vk(se::Object* obj); SE_DECLARE_FUNC(js_vk_CCVKDevice_checkExtension); SE_DECLARE_FUNC(js_vk_CCVKDevice_CCVKDevice); diff --git a/native/cocos/scripting/js-bindings/docs/JSB2.0-learning-en.md b/native/cocos/scripting/js-bindings/docs/JSB2.0-learning-en.md index 426f0802a4..decd8bf397 100644 --- a/native/cocos/scripting/js-bindings/docs/JSB2.0-learning-en.md +++ b/native/cocos/scripting/js-bindings/docs/JSB2.0-learning-en.md @@ -142,13 +142,13 @@ As we mentioned in the last section, `se::Object` is a weak reference to the JS * Reason 1: The requirement of controlling the life cycle of CPP objects by JS objects -After creating a Sprite in the script layer via `var sp = new cc.Sprite("a.png");`, we create a `se::Object` in the constructor callback and leave it in a global map (NativePtrToObjectMap), this map is used to query the `cocos2d::Sprite*` to get the corresponding JS object `se::Object*`. +After creating a Sprite in the script layer via `var sp = new cc.Sprite("a.png");`, we create a `se::Object` in the constructor callback and leave it in a global map (NativePtrToObjectMap), this map is used to query the `cc::Sprite*` to get the corresponding JS object `se::Object*`. ```c++ static bool js_cocos2d_Sprite_finalize(se::State& s) { - CCLOG("jsbindings: finalizing JS object %p (cocos2d::Sprite)", s.nativeThisObject()); - cocos2d::Sprite* cobj = (cocos2d::Sprite*)s.nativeThisObject(); + CCLOG("jsbindings: finalizing JS object %p (cc::Sprite)", s.nativeThisObject()); + cc::Sprite* cobj = (cc::Sprite*)s.nativeThisObject(); if (cobj->getReferenceCount() == 1) cobj->autorelease(); else @@ -159,7 +159,7 @@ SE_BIND_FINALIZE_FUNC(js_cocos2d_Sprite_finalize) static bool js_cocos2dx_Sprite_constructor(se::State& s) { - cocos2d::Sprite* cobj = new (std::nothrow) cocos2d::Sprite(); // cobj will be released in the finalize callback + cc::Sprite* cobj = new (std::nothrow) cc::Sprite(); // cobj will be released in the finalize callback s.thisObject()->setPrivateData(cobj); // setPrivateData will make a mapping between se::Object* and cobj return true; } @@ -762,35 +762,35 @@ bool seval_to_ulong(const se::Value& v, unsigned long* ret); bool seval_to_longlong(const se::Value& v, long long* ret); bool seval_to_ssize(const se::Value& v, ssize_t* ret); bool seval_to_std_string(const se::Value& v, std::string* ret); -bool seval_to_Vec2(const se::Value& v, cocos2d::Vec2* pt); -bool seval_to_Vec3(const se::Value& v, cocos2d::Vec3* pt); -bool seval_to_Vec4(const se::Value& v, cocos2d::Vec4* pt); -bool seval_to_Mat4(const se::Value& v, cocos2d::Mat4* mat); -bool seval_to_Size(const se::Value& v, cocos2d::Size* size); -bool seval_to_Rect(const se::Value& v, cocos2d::Rect* rect); -bool seval_to_Color3B(const se::Value& v, cocos2d::Color3B* color); -bool seval_to_Color4B(const se::Value& v, cocos2d::Color4B* color); -bool seval_to_Color4F(const se::Value& v, cocos2d::Color4F* color); -bool seval_to_ccvalue(const se::Value& v, cocos2d::Value* ret); -bool seval_to_ccvaluemap(const se::Value& v, cocos2d::ValueMap* ret); -bool seval_to_ccvaluemapintkey(const se::Value& v, cocos2d::ValueMapIntKey* ret); -bool seval_to_ccvaluevector(const se::Value& v, cocos2d::ValueVector* ret); -bool sevals_variadic_to_ccvaluevector(const se::ValueArray& args, cocos2d::ValueVector* ret); -bool seval_to_blendfunc(const se::Value& v, cocos2d::BlendFunc* ret); +bool seval_to_Vec2(const se::Value& v, cc::Vec2* pt); +bool seval_to_Vec3(const se::Value& v, cc::Vec3* pt); +bool seval_to_Vec4(const se::Value& v, cc::Vec4* pt); +bool seval_to_Mat4(const se::Value& v, cc::Mat4* mat); +bool seval_to_Size(const se::Value& v, cc::Size* size); +bool seval_to_Rect(const se::Value& v, cc::Rect* rect); +bool seval_to_Color3B(const se::Value& v, cc::Color3B* color); +bool seval_to_Color4B(const se::Value& v, cc::Color4B* color); +bool seval_to_Color4F(const se::Value& v, cc::Color4F* color); +bool seval_to_ccvalue(const se::Value& v, cc::Value* ret); +bool seval_to_ccvaluemap(const se::Value& v, cc::ValueMap* ret); +bool seval_to_ccvaluemapintkey(const se::Value& v, cc::ValueMapIntKey* ret); +bool seval_to_ccvaluevector(const se::Value& v, cc::ValueVector* ret); +bool sevals_variadic_to_ccvaluevector(const se::ValueArray& args, cc::ValueVector* ret); +bool seval_to_blendfunc(const se::Value& v, cc::BlendFunc* ret); bool seval_to_std_vector_string(const se::Value& v, std::vector* ret); bool seval_to_std_vector_int(const se::Value& v, std::vector* ret); bool seval_to_std_vector_float(const se::Value& v, std::vector* ret); -bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* ret); -bool seval_to_std_vector_Touch(const se::Value& v, std::vector* ret); +bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* ret); +bool seval_to_std_vector_Touch(const se::Value& v, std::vector* ret); bool seval_to_std_map_string_string(const se::Value& v, std::map* ret); -bool seval_to_FontDefinition(const se::Value& v, cocos2d::FontDefinition* ret); -bool seval_to_Acceleration(const se::Value& v, cocos2d::Acceleration* ret); -bool seval_to_Quaternion(const se::Value& v, cocos2d::Quaternion* ret); -bool seval_to_AffineTransform(const se::Value& v, cocos2d::AffineTransform* ret); -//bool seval_to_Viewport(const se::Value& v, cocos2d::experimental::Viewport* ret); -bool seval_to_Data(const se::Value& v, cocos2d::Data* ret); -bool seval_to_DownloaderHints(const se::Value& v, cocos2d::network::DownloaderHints* ret); -bool seval_to_TTFConfig(const se::Value& v, cocos2d::TTFConfig* ret); +bool seval_to_FontDefinition(const se::Value& v, cc::FontDefinition* ret); +bool seval_to_Acceleration(const se::Value& v, cc::Acceleration* ret); +bool seval_to_Quaternion(const se::Value& v, cc::Quaternion* ret); +bool seval_to_AffineTransform(const se::Value& v, cc::AffineTransform* ret); +//bool seval_to_Viewport(const se::Value& v, cc::experimental::Viewport* ret); +bool seval_to_Data(const se::Value& v, cc::Data* ret); +bool seval_to_DownloaderHints(const se::Value& v, cc::network::DownloaderHints* ret); +bool seval_to_TTFConfig(const se::Value& v, cc::TTFConfig* ret); //box2d seval to native convertion bool seval_to_b2Vec2(const se::Value& v, b2Vec2* ret); @@ -800,10 +800,10 @@ template bool seval_to_native_ptr(const se::Value& v, T* ret); template -bool seval_to_Vector(const se::Value& v, cocos2d::Vector* ret); +bool seval_to_Vector(const se::Value& v, cc::Vector* ret); template -bool seval_to_Map_string_key(const se::Value& v, cocos2d::Map* ret) +bool seval_to_Map_string_key(const se::Value& v, cc::Map* ret) ``` @@ -825,57 +825,57 @@ bool longlong_to_seval(long long v, se::Value* ret); bool ssize_to_seval(ssize_t v, se::Value* ret); bool std_string_to_seval(const std::string& v, se::Value* ret); -bool Vec2_to_seval(const cocos2d::Vec2& v, se::Value* ret); -bool Vec3_to_seval(const cocos2d::Vec3& v, se::Value* ret); -bool Vec4_to_seval(const cocos2d::Vec4& v, se::Value* ret); -bool Mat4_to_seval(const cocos2d::Mat4& v, se::Value* ret); -bool Size_to_seval(const cocos2d::Size& v, se::Value* ret); -bool Rect_to_seval(const cocos2d::Rect& v, se::Value* ret); -bool Color3B_to_seval(const cocos2d::Color3B& v, se::Value* ret); -bool Color4B_to_seval(const cocos2d::Color4B& v, se::Value* ret); -bool Color4F_to_seval(const cocos2d::Color4F& v, se::Value* ret); -bool ccvalue_to_seval(const cocos2d::Value& v, se::Value* ret); -bool ccvaluemap_to_seval(const cocos2d::ValueMap& v, se::Value* ret); -bool ccvaluemapintkey_to_seval(const cocos2d::ValueMapIntKey& v, se::Value* ret); -bool ccvaluevector_to_seval(const cocos2d::ValueVector& v, se::Value* ret); -bool blendfunc_to_seval(const cocos2d::BlendFunc& v, se::Value* ret); +bool Vec2_to_seval(const cc::Vec2& v, se::Value* ret); +bool Vec3_to_seval(const cc::Vec3& v, se::Value* ret); +bool Vec4_to_seval(const cc::Vec4& v, se::Value* ret); +bool Mat4_to_seval(const cc::Mat4& v, se::Value* ret); +bool Size_to_seval(const cc::Size& v, se::Value* ret); +bool Rect_to_seval(const cc::Rect& v, se::Value* ret); +bool Color3B_to_seval(const cc::Color3B& v, se::Value* ret); +bool Color4B_to_seval(const cc::Color4B& v, se::Value* ret); +bool Color4F_to_seval(const cc::Color4F& v, se::Value* ret); +bool ccvalue_to_seval(const cc::Value& v, se::Value* ret); +bool ccvaluemap_to_seval(const cc::ValueMap& v, se::Value* ret); +bool ccvaluemapintkey_to_seval(const cc::ValueMapIntKey& v, se::Value* ret); +bool ccvaluevector_to_seval(const cc::ValueVector& v, se::Value* ret); +bool blendfunc_to_seval(const cc::BlendFunc& v, se::Value* ret); bool std_vector_string_to_seval(const std::vector& v, se::Value* ret); bool std_vector_int_to_seval(const std::vector& v, se::Value* ret); bool std_vector_float_to_seval(const std::vector& v, se::Value* ret); -bool std_vector_Touch_to_seval(const std::vector& v, se::Value* ret); +bool std_vector_Touch_to_seval(const std::vector& v, se::Value* ret); bool std_map_string_string_to_seval(const std::map& v, se::Value* ret); -bool uniform_to_seval(const cocos2d::Uniform* v, se::Value* ret); -bool FontDefinition_to_seval(const cocos2d::FontDefinition& v, se::Value* ret); -bool Acceleration_to_seval(const cocos2d::Acceleration* v, se::Value* ret); -bool Quaternion_to_seval(const cocos2d::Quaternion& v, se::Value* ret); -bool ManifestAsset_to_seval(const cocos2d::extension::ManifestAsset& v, se::Value* ret); -bool AffineTransform_to_seval(const cocos2d::AffineTransform& v, se::Value* ret); -bool Data_to_seval(const cocos2d::Data& v, se::Value* ret); -bool DownloadTask_to_seval(const cocos2d::network::DownloadTask& v, se::Value* ret); +bool uniform_to_seval(const cc::Uniform* v, se::Value* ret); +bool FontDefinition_to_seval(const cc::FontDefinition& v, se::Value* ret); +bool Acceleration_to_seval(const cc::Acceleration* v, se::Value* ret); +bool Quaternion_to_seval(const cc::Quaternion& v, se::Value* ret); +bool ManifestAsset_to_seval(const cc::extension::ManifestAsset& v, se::Value* ret); +bool AffineTransform_to_seval(const cc::AffineTransform& v, se::Value* ret); +bool Data_to_seval(const cc::Data& v, se::Value* ret); +bool DownloadTask_to_seval(const cc::network::DownloadTask& v, se::Value* ret); template -bool Vector_to_seval(const cocos2d::Vector& v, se::Value* ret); +bool Vector_to_seval(const cc::Vector& v, se::Value* ret); template -bool Map_string_key_to_seval(const cocos2d::Map& v, se::Value* ret); +bool Map_string_key_to_seval(const cc::Map& v, se::Value* ret); template -bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); template -bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) +bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) template -bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); template -bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr); template -bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); template -bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr); // Spine conversions @@ -918,7 +918,7 @@ bool ok = seval_to_int32(args[0], &v); // The second parameter is the output par **Developers must understand the difference to make sure these conversion functions not being misused. In that case, JS memory leaks, which is really difficult to fix, could be avoided.** -* `native_ptr_to_seval` is used in `JS control CPP object life cycle` mode. This method can be called when a `se::Value` needs to be obtained from a CPP object pointer at the binding code. Most subclasses in the Cocos2D-X that inherit from `cocos2d::Ref` take this approach to get `se::Value`. Please remember, when the binding object, which is controlled by the JS object's life cycle, need to be converted to seval, use this method, otherwise consider using `native_ptr_to_rooted_seval`. +* `native_ptr_to_seval` is used in `JS control CPP object life cycle` mode. This method can be called when a `se::Value` needs to be obtained from a CPP object pointer at the binding code. Most subclasses in the Cocos2D-X that inherit from `cc::Ref` take this approach to get `se::Value`. Please remember, when the binding object, which is controlled by the JS object's life cycle, need to be converted to seval, use this method, otherwise consider using `native_ptr_to_rooted_seval`. * `native_ptr_to_rooted_seval` is used in `CPP controlling JS object lifecycle` mode. In general, this method is used for object bindings in third-party libraries. This method will try to find the cached `se::Object` according the incoming CPP object pointer, if the cached `se::Object`is not exist, then it will create a rooted `se::Object` which isn't controlled by Garbage Collector and will always keep alive until `unroot` is called. Developers need to observe the release of the CPP object, and `unroot` `se::Object`. Please refer to the section introduces `spTrackEntry` binding (spTrackEntry_setDisposeCallback) described above. @@ -926,7 +926,7 @@ bool ok = seval_to_int32(args[0], &v); // The second parameter is the output par ### Configure Module .ini Files -The configuration method is the same as that in Creator v1.6. The main points to note are: In Creator v1.7 `script_control_cpp` field is deprecated because `script_control_cpp` field affects the entire module. If the module needs to bind the `cocos2d::Ref` subclass and non- `cocos2d::Ref` class, the original binding configuration in v1.6 can not meet the demand. The new field introduced in v1.7 is `classes_owned_by_cpp`, which indicates which classes need to be controlled by the CPP object's life cycle. +The configuration method is the same as that in Creator v1.6. The main points to note are: In Creator v1.7 `script_control_cpp` field is deprecated because `script_control_cpp` field affects the entire module. If the module needs to bind the `cc::Ref` subclass and non- `cc::Ref` class, the original binding configuration in v1.6 can not meet the demand. The new field introduced in v1.7 is `classes_owned_by_cpp`, which indicates which classes need to be controlled by the CPP object's life cycle. An additional, there is a configuration field in v1.7 is `persistent_classes` to indicate which classes are always present during game play, such as: `TextureCache`, `SpriteFrameCache`, `FileUtils`, `EventDispatcher`, `ActionManager`, `Scheduler`. @@ -1108,13 +1108,13 @@ Use se::Object::dettachObject to disassociate object's life cycle. `objA->attachObject(objB);` is similar as `objA .__ nativeRefs [index] = objB` in JS. Only when `objA` is garbage collected, `objB` will be possible garbage collected. `objA->dettachObject(objB);` is similar as `delete objA.__nativeRefs[index];` in JS. After invoking dettachObject, objB's life cycle will not be controlled by objA -### What's The Difference of Object Life Management between The Subclass of `cocos2d::Ref` and non-`cocos2d::Ref` class? +### What's The Difference of Object Life Management between The Subclass of `cc::Ref` and non-`cc::Ref` class? -The binding of `cocos2d::Ref` subclass in the current engine adopts JS object controls the life cycle of CPP object. The advantage of doing so is to solve the `retain`/`release` problem that has been criticized in the JS layer. +The binding of `cc::Ref` subclass in the current engine adopts JS object controls the life cycle of CPP object. The advantage of doing so is to solve the `retain`/`release` problem that has been criticized in the JS layer. -Non-`cocos2d::Ref` class takes the way of CPP object controls the life of a JS object. This method requires that after CPP object is destroyed, it needs to notify the binding layer to call the `clearPrivateData`, `unroot`, and `decRef` methods corresponding to `se::Object`. JS code must be careful operation of the object, when there may be illegal object logic, use `cc.sys.isObjectValid` to determine whether the CPP object is released. +Non-`cc::Ref` class takes the way of CPP object controls the life of a JS object. This method requires that after CPP object is destroyed, it needs to notify the binding layer to call the `clearPrivateData`, `unroot`, and `decRef` methods corresponding to `se::Object`. JS code must be careful operation of the object, when there may be illegal object logic, use `cc.sys.isObjectValid` to determine whether the CPP object is released. -### NOTE of Binding The Finalize Function for cocos2d::Ref Subclass +### NOTE of Binding The Finalize Function for cc::Ref Subclass Calling any JS engine's API in a finalize callback can lead to a crash. Because the current engine is in garbage collection process, which can not be interrupted to deal with other operations. Finalize callback is to tell the CPP layer to release the memory of the corresponding CPP object, we should not call any JS engine API in the CPP object's destructor either. @@ -1126,8 +1126,8 @@ In Cocos2D-X binding, if the native object's reference count is 1, we do not use ```c++ static bool js_cocos2d_Sprite_finalize(se::State& s) { - CCLOG("jsbindings: finalizing JS object %p (cocos2d::Sprite)", s.nativeThisObject()); - cocos2d::Sprite* cobj = (cocos2d::Sprite*)s.nativeThisObject(); + CCLOG("jsbindings: finalizing JS object %p (cc::Sprite)", s.nativeThisObject()); + cc::Sprite* cobj = (cc::Sprite*)s.nativeThisObject(); if (cobj->getReferenceCount() == 1) cobj->autorelease(); else @@ -1137,14 +1137,14 @@ static bool js_cocos2d_Sprite_finalize(se::State& s) SE_BIND_FINALIZE_FUNC(js_cocos2d_Sprite_finalize) ``` -### Please DO NOT Assign A Subclass of cocos2d::Ref on The Stack +### Please DO NOT Assign A Subclass of cc::Ref on The Stack -Subclasses of `cocos2d::Ref` must be allocated on the heap, via `new`, and then released by` release`. In JS object's finalize callback function, we should use 'autorelease` or `release` to release. If it is allocated on the stack, the reference count is likely to be 0, and then calling `release` in finalize callback will result `delete` is invoked, which causing the program to crash. So in order to prevent this behavior from happening, developers can identify destructors as `protected` or` private` in the binding classes that inherit from `cocos2d::Ref`, ensuring that this problem can be found during compilation. +Subclasses of `cc::Ref` must be allocated on the heap, via `new`, and then released by` release`. In JS object's finalize callback function, we should use 'autorelease` or `release` to release. If it is allocated on the stack, the reference count is likely to be 0, and then calling `release` in finalize callback will result `delete` is invoked, which causing the program to crash. So in order to prevent this behavior from happening, developers can identify destructors as `protected` or` private` in the binding classes that inherit from `cc::Ref`, ensuring that this problem can be found during compilation. E.g: ```c++ -class CC_EX_DLL EventAssetsManagerEx : public cocos2d::EventCustom +class CC_EX_DLL EventAssetsManagerEx : public cc::EventCustom { public: ... diff --git a/native/cocos/scripting/js-bindings/docs/JSB2.0-learning-zh.md b/native/cocos/scripting/js-bindings/docs/JSB2.0-learning-zh.md index 1f6b88fadf..b4c4924581 100644 --- a/native/cocos/scripting/js-bindings/docs/JSB2.0-learning-zh.md +++ b/native/cocos/scripting/js-bindings/docs/JSB2.0-learning-zh.md @@ -141,13 +141,13 @@ se::Object 继承于 se::RefCounter 引用计数管理类。目前抽象层中 * 原因一:JS 对象控制 CPP 对象的生命周期的需要 -当在脚本层中通过 `var sp = new cc.Sprite("a.png");` 创建了一个 Sprite 后,在构造回调函数绑定中我们会创建一个 se::Object 并保留在一个全局的 map (NativePtrToObjectMap) 中,此 map 用于查询 `cocos2d::Sprite*` 指针获取对应的 JS 对象 `se::Object*` 。 +当在脚本层中通过 `var sp = new cc.Sprite("a.png");` 创建了一个 Sprite 后,在构造回调函数绑定中我们会创建一个 se::Object 并保留在一个全局的 map (NativePtrToObjectMap) 中,此 map 用于查询 `cc::Sprite*` 指针获取对应的 JS 对象 `se::Object*` 。 ```c++ static bool js_cocos2d_Sprite_finalize(se::State& s) { - CCLOG("jsbindings: finalizing JS object %p (cocos2d::Sprite)", s.nativeThisObject()); - cocos2d::Sprite* cobj = (cocos2d::Sprite*)s.nativeThisObject(); + CCLOG("jsbindings: finalizing JS object %p (cc::Sprite)", s.nativeThisObject()); + cc::Sprite* cobj = (cc::Sprite*)s.nativeThisObject(); if (cobj->getReferenceCount() == 1) cobj->autorelease(); else @@ -158,7 +158,7 @@ SE_BIND_FINALIZE_FUNC(js_cocos2d_Sprite_finalize) static bool js_cocos2dx_Sprite_constructor(se::State& s) { - cocos2d::Sprite* cobj = new (std::nothrow) cocos2d::Sprite(); // cobj 将在 finalize 函数中被释放 + cc::Sprite* cobj = new (std::nothrow) cc::Sprite(); // cobj 将在 finalize 函数中被释放 s.thisObject()->setPrivateData(cobj); // setPrivateData 内部会去保存 cobj 到 NativePtrToObjectMap 中 return true; } @@ -173,7 +173,7 @@ SE_BIND_CTOR(js_cocos2dx_Sprite_constructor, __jsb_cocos2d_Sprite_class, js_coco se::Object 中提供了 root/unroot 方法供开发者调用,root 会把 JS 对象放入到不受 GC 扫描到的区域,调用 root 后,se::Object 就强引用了 JS 对象,只有当 unroot 被调用,或者 se::Object 被释放后,JS 对象才会放回到受 GC 扫描到的区域。 -一般情况下,如果对象是非 `cocos2d::Ref` 的子类,会采用 CPP 对象控制 JS 对象的生命周期的方式去绑定。引擎内 spine, dragonbones, box2d,anysdk 等第三方库的绑定就是采用此方式。当 CPP 对象被释放的时候,需要在 NativePtrToObjectMap 中查找对应的 se::Object,然后手动 unroot 和 decRef。以 spine 中 spTrackEntry 的绑定为例: +一般情况下,如果对象是非 `cc::Ref` 的子类,会采用 CPP 对象控制 JS 对象的生命周期的方式去绑定。引擎内 spine, dragonbones, box2d,anysdk 等第三方库的绑定就是采用此方式。当 CPP 对象被释放的时候,需要在 NativePtrToObjectMap 中查找对应的 se::Object,然后手动 unroot 和 decRef。以 spine 中 spTrackEntry 的绑定为例: ```c++ spTrackEntry_setDisposeCallback([](spTrackEntry* entry){ @@ -750,35 +750,35 @@ bool seval_to_ulong(const se::Value& v, unsigned long* ret); bool seval_to_longlong(const se::Value& v, long long* ret); bool seval_to_ssize(const se::Value& v, ssize_t* ret); bool seval_to_std_string(const se::Value& v, std::string* ret); -bool seval_to_Vec2(const se::Value& v, cocos2d::Vec2* pt); -bool seval_to_Vec3(const se::Value& v, cocos2d::Vec3* pt); -bool seval_to_Vec4(const se::Value& v, cocos2d::Vec4* pt); -bool seval_to_Mat4(const se::Value& v, cocos2d::Mat4* mat); -bool seval_to_Size(const se::Value& v, cocos2d::Size* size); -bool seval_to_Rect(const se::Value& v, cocos2d::Rect* rect); -bool seval_to_Color3B(const se::Value& v, cocos2d::Color3B* color); -bool seval_to_Color4B(const se::Value& v, cocos2d::Color4B* color); -bool seval_to_Color4F(const se::Value& v, cocos2d::Color4F* color); -bool seval_to_ccvalue(const se::Value& v, cocos2d::Value* ret); -bool seval_to_ccvaluemap(const se::Value& v, cocos2d::ValueMap* ret); -bool seval_to_ccvaluemapintkey(const se::Value& v, cocos2d::ValueMapIntKey* ret); -bool seval_to_ccvaluevector(const se::Value& v, cocos2d::ValueVector* ret); -bool sevals_variadic_to_ccvaluevector(const se::ValueArray& args, cocos2d::ValueVector* ret); -bool seval_to_blendfunc(const se::Value& v, cocos2d::BlendFunc* ret); +bool seval_to_Vec2(const se::Value& v, cc::Vec2* pt); +bool seval_to_Vec3(const se::Value& v, cc::Vec3* pt); +bool seval_to_Vec4(const se::Value& v, cc::Vec4* pt); +bool seval_to_Mat4(const se::Value& v, cc::Mat4* mat); +bool seval_to_Size(const se::Value& v, cc::Size* size); +bool seval_to_Rect(const se::Value& v, cc::Rect* rect); +bool seval_to_Color3B(const se::Value& v, cc::Color3B* color); +bool seval_to_Color4B(const se::Value& v, cc::Color4B* color); +bool seval_to_Color4F(const se::Value& v, cc::Color4F* color); +bool seval_to_ccvalue(const se::Value& v, cc::Value* ret); +bool seval_to_ccvaluemap(const se::Value& v, cc::ValueMap* ret); +bool seval_to_ccvaluemapintkey(const se::Value& v, cc::ValueMapIntKey* ret); +bool seval_to_ccvaluevector(const se::Value& v, cc::ValueVector* ret); +bool sevals_variadic_to_ccvaluevector(const se::ValueArray& args, cc::ValueVector* ret); +bool seval_to_blendfunc(const se::Value& v, cc::BlendFunc* ret); bool seval_to_std_vector_string(const se::Value& v, std::vector* ret); bool seval_to_std_vector_int(const se::Value& v, std::vector* ret); bool seval_to_std_vector_float(const se::Value& v, std::vector* ret); -bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* ret); -bool seval_to_std_vector_Touch(const se::Value& v, std::vector* ret); +bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* ret); +bool seval_to_std_vector_Touch(const se::Value& v, std::vector* ret); bool seval_to_std_map_string_string(const se::Value& v, std::map* ret); -bool seval_to_FontDefinition(const se::Value& v, cocos2d::FontDefinition* ret); -bool seval_to_Acceleration(const se::Value& v, cocos2d::Acceleration* ret); -bool seval_to_Quaternion(const se::Value& v, cocos2d::Quaternion* ret); -bool seval_to_AffineTransform(const se::Value& v, cocos2d::AffineTransform* ret); -//bool seval_to_Viewport(const se::Value& v, cocos2d::experimental::Viewport* ret); -bool seval_to_Data(const se::Value& v, cocos2d::Data* ret); -bool seval_to_DownloaderHints(const se::Value& v, cocos2d::network::DownloaderHints* ret); -bool seval_to_TTFConfig(const se::Value& v, cocos2d::TTFConfig* ret); +bool seval_to_FontDefinition(const se::Value& v, cc::FontDefinition* ret); +bool seval_to_Acceleration(const se::Value& v, cc::Acceleration* ret); +bool seval_to_Quaternion(const se::Value& v, cc::Quaternion* ret); +bool seval_to_AffineTransform(const se::Value& v, cc::AffineTransform* ret); +//bool seval_to_Viewport(const se::Value& v, cc::experimental::Viewport* ret); +bool seval_to_Data(const se::Value& v, cc::Data* ret); +bool seval_to_DownloaderHints(const se::Value& v, cc::network::DownloaderHints* ret); +bool seval_to_TTFConfig(const se::Value& v, cc::TTFConfig* ret); //box2d seval to native convertion bool seval_to_b2Vec2(const se::Value& v, b2Vec2* ret); @@ -788,10 +788,10 @@ template bool seval_to_native_ptr(const se::Value& v, T* ret); template -bool seval_to_Vector(const se::Value& v, cocos2d::Vector* ret); +bool seval_to_Vector(const se::Value& v, cc::Vector* ret); template -bool seval_to_Map_string_key(const se::Value& v, cocos2d::Map* ret) +bool seval_to_Map_string_key(const se::Value& v, cc::Map* ret) ``` @@ -813,57 +813,57 @@ bool longlong_to_seval(long long v, se::Value* ret); bool ssize_to_seval(ssize_t v, se::Value* ret); bool std_string_to_seval(const std::string& v, se::Value* ret); -bool Vec2_to_seval(const cocos2d::Vec2& v, se::Value* ret); -bool Vec3_to_seval(const cocos2d::Vec3& v, se::Value* ret); -bool Vec4_to_seval(const cocos2d::Vec4& v, se::Value* ret); -bool Mat4_to_seval(const cocos2d::Mat4& v, se::Value* ret); -bool Size_to_seval(const cocos2d::Size& v, se::Value* ret); -bool Rect_to_seval(const cocos2d::Rect& v, se::Value* ret); -bool Color3B_to_seval(const cocos2d::Color3B& v, se::Value* ret); -bool Color4B_to_seval(const cocos2d::Color4B& v, se::Value* ret); -bool Color4F_to_seval(const cocos2d::Color4F& v, se::Value* ret); -bool ccvalue_to_seval(const cocos2d::Value& v, se::Value* ret); -bool ccvaluemap_to_seval(const cocos2d::ValueMap& v, se::Value* ret); -bool ccvaluemapintkey_to_seval(const cocos2d::ValueMapIntKey& v, se::Value* ret); -bool ccvaluevector_to_seval(const cocos2d::ValueVector& v, se::Value* ret); -bool blendfunc_to_seval(const cocos2d::BlendFunc& v, se::Value* ret); +bool Vec2_to_seval(const cc::Vec2& v, se::Value* ret); +bool Vec3_to_seval(const cc::Vec3& v, se::Value* ret); +bool Vec4_to_seval(const cc::Vec4& v, se::Value* ret); +bool Mat4_to_seval(const cc::Mat4& v, se::Value* ret); +bool Size_to_seval(const cc::Size& v, se::Value* ret); +bool Rect_to_seval(const cc::Rect& v, se::Value* ret); +bool Color3B_to_seval(const cc::Color3B& v, se::Value* ret); +bool Color4B_to_seval(const cc::Color4B& v, se::Value* ret); +bool Color4F_to_seval(const cc::Color4F& v, se::Value* ret); +bool ccvalue_to_seval(const cc::Value& v, se::Value* ret); +bool ccvaluemap_to_seval(const cc::ValueMap& v, se::Value* ret); +bool ccvaluemapintkey_to_seval(const cc::ValueMapIntKey& v, se::Value* ret); +bool ccvaluevector_to_seval(const cc::ValueVector& v, se::Value* ret); +bool blendfunc_to_seval(const cc::BlendFunc& v, se::Value* ret); bool std_vector_string_to_seval(const std::vector& v, se::Value* ret); bool std_vector_int_to_seval(const std::vector& v, se::Value* ret); bool std_vector_float_to_seval(const std::vector& v, se::Value* ret); -bool std_vector_Touch_to_seval(const std::vector& v, se::Value* ret); +bool std_vector_Touch_to_seval(const std::vector& v, se::Value* ret); bool std_map_string_string_to_seval(const std::map& v, se::Value* ret); -bool uniform_to_seval(const cocos2d::Uniform* v, se::Value* ret); -bool FontDefinition_to_seval(const cocos2d::FontDefinition& v, se::Value* ret); -bool Acceleration_to_seval(const cocos2d::Acceleration* v, se::Value* ret); -bool Quaternion_to_seval(const cocos2d::Quaternion& v, se::Value* ret); -bool ManifestAsset_to_seval(const cocos2d::extension::ManifestAsset& v, se::Value* ret); -bool AffineTransform_to_seval(const cocos2d::AffineTransform& v, se::Value* ret); -bool Data_to_seval(const cocos2d::Data& v, se::Value* ret); -bool DownloadTask_to_seval(const cocos2d::network::DownloadTask& v, se::Value* ret); +bool uniform_to_seval(const cc::Uniform* v, se::Value* ret); +bool FontDefinition_to_seval(const cc::FontDefinition& v, se::Value* ret); +bool Acceleration_to_seval(const cc::Acceleration* v, se::Value* ret); +bool Quaternion_to_seval(const cc::Quaternion& v, se::Value* ret); +bool ManifestAsset_to_seval(const cc::extension::ManifestAsset& v, se::Value* ret); +bool AffineTransform_to_seval(const cc::AffineTransform& v, se::Value* ret); +bool Data_to_seval(const cc::Data& v, se::Value* ret); +bool DownloadTask_to_seval(const cc::network::DownloadTask& v, se::Value* ret); template -bool Vector_to_seval(const cocos2d::Vector& v, se::Value* ret); +bool Vector_to_seval(const cc::Vector& v, se::Value* ret); template -bool Map_string_key_to_seval(const cocos2d::Map& v, se::Value* ret); +bool Map_string_key_to_seval(const cc::Map& v, se::Value* ret); template -bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); template -bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) +bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) template -bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); template -bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr); template -bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr); template -bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr); +bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr); // Spine conversions @@ -906,7 +906,7 @@ bool ok = seval_to_int32(args[0], &v); // 第二个参数为输出参数,传 **开发者一定要理解清楚这二者的区别,才不会因为误用导致 JS 层内存泄露这种比较难查的 bug。** -* `native_ptr_to_seval` 用于 `JS 控制 CPP 对象生命周期` 的模式。当在绑定层需要根据一个 CPP 对象指针获取一个 se::Value 的时候,可调用此方法。引擎内大部分继承于 `cocos2d::Ref` 的子类都采取这种方式去获取 se::Value。记住一点,当你管理的绑定对象是由 JS 控制生命周期,需要转换为 seval 的时候,请用此方法,否则考虑用 `native_ptr_to_rooted_seval` 。 +* `native_ptr_to_seval` 用于 `JS 控制 CPP 对象生命周期` 的模式。当在绑定层需要根据一个 CPP 对象指针获取一个 se::Value 的时候,可调用此方法。引擎内大部分继承于 `cc::Ref` 的子类都采取这种方式去获取 se::Value。记住一点,当你管理的绑定对象是由 JS 控制生命周期,需要转换为 seval 的时候,请用此方法,否则考虑用 `native_ptr_to_rooted_seval` 。 * `native_ptr_to_rooted_seval`用于`CPP 控制 JS 对象生命周期`的模式。一般而言,第三方库中的对象绑定都会用到此方法。此方法会根据传入的 CPP 对象指针查找 cache 住的 se::Object,如果不存在,则创建一个 rooted 的 se::Object,即这个创建出来的 JS 对象将不受 GC 控制,并永远在内存中。开发者需要监听 CPP 对象的释放,并在释放的时候去做 se::Object 的 unroot 操作,具体可参照前面章节中描述的 spTrackEntry_setDisposeCallback 中的内容。 @@ -914,7 +914,7 @@ bool ok = seval_to_int32(args[0], &v); // 第二个参数为输出参数,传 ### 配置模块 ini 文件 -配置方法与 1.6 中的方法相同,主要注意的是:1.7 中废弃了 `script_control_cpp` ,因为 `script_control_cpp` 字段会影响到整个模块,如果模块中需要绑定 cocos2d::Ref 子类和非 cocos::Ref 子类,原来的绑定配置则无法满足需求。1.7 中取而代之的新字段为 `classes_owned_by_cpp` ,表示哪些类是需要由 CPP 来控制 JS 对象的生命周期。 +配置方法与 1.6 中的方法相同,主要注意的是:1.7 中废弃了 `script_control_cpp` ,因为 `script_control_cpp` 字段会影响到整个模块,如果模块中需要绑定 cc::Ref 子类和非 cocos::Ref 子类,原来的绑定配置则无法满足需求。1.7 中取而代之的新字段为 `classes_owned_by_cpp` ,表示哪些类是需要由 CPP 来控制 JS 对象的生命周期。 1.7 中另外加入的一个配置字段为 `persistent_classes` , 用于表示哪些类是在游戏运行中一直存在的,比如:TextureCache SpriteFrameCache FileUtils EventDispatcher ActionManager Scheduler @@ -1095,13 +1095,13 @@ se::Object::attachObject/dettachObject `objA->attachObject(objB);`类似于 JS 中执行`objA.__nativeRefs[index] = objB`,只有当 objA 被 GC 后,objB 才有可能被 GC `objA->dettachObject(objB);`类似于 JS 中执行`delete objA.__nativeRefs[index];`,这样 objB 的生命周期就不受 objA 控制了 -### cocos2d::Ref 子类与非 cocos2d::Ref 子类 JS/CPP 对象生命周期管理有何不同? +### cc::Ref 子类与非 cc::Ref 子类 JS/CPP 对象生命周期管理有何不同? -目前引擎中 cocos2d::Ref 子类的绑定采用 JS 对象控制 CPP 对象生命周期的方式,这样做的好处是,解决了一直以来被诟病的需要在 JS 层 retain,release 对象的烦恼。 +目前引擎中 cc::Ref 子类的绑定采用 JS 对象控制 CPP 对象生命周期的方式,这样做的好处是,解决了一直以来被诟病的需要在 JS 层 retain,release 对象的烦恼。 -非 cocos2d::Ref 子类采用 CPP 对象控制 JS 对象生命周期的方式。此方式要求,CPP 对象销毁后需要通知绑定层去调用对应 se::Object 的 clearPrivateData, unroot, decRef 的方法。JS 代码中一定要慎重操作对象,当有可能出现非法对象的逻辑中,使用 cc.sys.isObjectValid 来判断 CPP 对象是否被释放了。 +非 cc::Ref 子类采用 CPP 对象控制 JS 对象生命周期的方式。此方式要求,CPP 对象销毁后需要通知绑定层去调用对应 se::Object 的 clearPrivateData, unroot, decRef 的方法。JS 代码中一定要慎重操作对象,当有可能出现非法对象的逻辑中,使用 cc.sys.isObjectValid 来判断 CPP 对象是否被释放了。 -### 绑定 cocos2d::Ref 子类的析构函数需要注意的事项 +### 绑定 cc::Ref 子类的析构函数需要注意的事项 如果在 JS 对象的 finalize 回调中调用任何 JS 引擎的 API,可能导致崩溃。因为当前引擎正在进行垃圾回收的流程,无法被打断处理其他操作。 finalize 回调中是告诉 CPP 层是否对应的 CPP 对象的内存,不能在 CPP 对象的析构中又去操作 JS 引擎 API。 @@ -1113,8 +1113,8 @@ cocos2d-x 的绑定中,如果引用计数为 1 了,我们不使用 release ```c++ static bool js_cocos2d_Sprite_finalize(se::State& s) { - CCLOG("jsbindings: finalizing JS object %p (cocos2d::Sprite)", s.nativeThisObject()); - cocos2d::Sprite* cobj = (cocos2d::Sprite*)s.nativeThisObject(); + CCLOG("jsbindings: finalizing JS object %p (cc::Sprite)", s.nativeThisObject()); + cc::Sprite* cobj = (cc::Sprite*)s.nativeThisObject(); if (cobj->getReferenceCount() == 1) cobj->autorelease(); else @@ -1124,14 +1124,14 @@ static bool js_cocos2d_Sprite_finalize(se::State& s) SE_BIND_FINALIZE_FUNC(js_cocos2d_Sprite_finalize) ``` -### 请不要在栈(Stack)上分配 cocos2d::Ref 的子类对象 +### 请不要在栈(Stack)上分配 cc::Ref 的子类对象 -Ref 的子类必须在堆(Heap)上分配,即通过 `new` ,然后通过 `release` 来释放。当 JS 对象的 finalize 回调函数中统一使用 `autorelease` 或 `release` 来释放。如果是在栈上的对象,reference count 很有可能为 0,而这时调用 `release` ,其内部会调用 `delete` ,从而导致程序崩溃。所以为了防止这个行为的出现,开发者可以在继承于 cocos2d::Ref 的绑定类中,标识析构函数为 `protected` 或者 `private` ,保证在编译阶段就能发现这个问题。 +Ref 的子类必须在堆(Heap)上分配,即通过 `new` ,然后通过 `release` 来释放。当 JS 对象的 finalize 回调函数中统一使用 `autorelease` 或 `release` 来释放。如果是在栈上的对象,reference count 很有可能为 0,而这时调用 `release` ,其内部会调用 `delete` ,从而导致程序崩溃。所以为了防止这个行为的出现,开发者可以在继承于 cc::Ref 的绑定类中,标识析构函数为 `protected` 或者 `private` ,保证在编译阶段就能发现这个问题。 例如: ```c++ -class CC_EX_DLL EventAssetsManagerEx : public cocos2d::EventCustom +class CC_EX_DLL EventAssetsManagerEx : public cc::EventCustom { public: ... diff --git a/native/cocos/scripting/js-bindings/event/EventDispatcher.cpp b/native/cocos/scripting/js-bindings/event/EventDispatcher.cpp index 5eff1287bd..be0c086341 100644 --- a/native/cocos/scripting/js-bindings/event/EventDispatcher.cpp +++ b/native/cocos/scripting/js-bindings/event/EventDispatcher.cpp @@ -38,7 +38,7 @@ namespace { bool _inited = false; } -namespace cocos2d +namespace cc { std::unordered_map EventDispatcher::_listeners; @@ -452,4 +452,4 @@ void EventDispatcher::dispatchCustomEvent(const CustomEvent& event) } } -} // end of namespace cocos2d +} // end of namespace cc diff --git a/native/cocos/scripting/js-bindings/event/EventDispatcher.h b/native/cocos/scripting/js-bindings/event/EventDispatcher.h index c235757dfd..5757781eb8 100644 --- a/native/cocos/scripting/js-bindings/event/EventDispatcher.h +++ b/native/cocos/scripting/js-bindings/event/EventDispatcher.h @@ -29,7 +29,7 @@ #include #include -namespace cocos2d +namespace cc { // Touch event related @@ -199,4 +199,4 @@ private: static std::unordered_map _listeners; }; -} // end of namespace cocos2d +} // end of namespace cc diff --git a/native/cocos/scripting/js-bindings/jswrapper/v8/ScriptEngine.cpp b/native/cocos/scripting/js-bindings/jswrapper/v8/ScriptEngine.cpp index b42389d322..0193d9f092 100644 --- a/native/cocos/scripting/js-bindings/jswrapper/v8/ScriptEngine.cpp +++ b/native/cocos/scripting/js-bindings/jswrapper/v8/ScriptEngine.cpp @@ -670,7 +670,7 @@ namespace se { #if CC_PLATFORM == CC_PLATFORM_MAC_OSX if(strncmp("(no filename)", sourceUrl.c_str(), sizeof("(no filename)") )!= 0) { - sourceUrl = cocos2d::FileUtils::getInstance()->fullPathForFilename(sourceUrl); + sourceUrl = cc::FileUtils::getInstance()->fullPathForFilename(sourceUrl); } #endif @@ -748,7 +748,7 @@ namespace se { bool ScriptEngine::saveByteCodeToFile(const std::string& path, const std::string& path_bc) { bool success = false; - auto fu = cocos2d::FileUtils::getInstance(); + auto fu = cc::FileUtils::getInstance(); if (path_bc.length() > 3 && path_bc.substr(path_bc.length() - 3) != ".bc") { SE_LOGE("ScriptEngine::generateByteCode bytecode file path should endwith \".bc\"\n");; @@ -794,7 +794,7 @@ namespace se { // create CachedData v8::ScriptCompiler::CachedData *cd = v8::ScriptCompiler::CreateCodeCache(v8_script); // save to file - cocos2d::Data writeData; + cc::Data writeData; writeData.copy(cd->data, cd->length); success = fu->writeDataToFile(writeData, path_bc); if (!success) { @@ -805,9 +805,9 @@ namespace se { bool ScriptEngine::runByteCodeFile(const std::string &path_bc, Value* ret/* = nullptr */) { - auto fu = cocos2d::FileUtils::getInstance(); + auto fu = cc::FileUtils::getInstance(); - cocos2d::Data cachedData; + cc::Data cachedData; fu->getContents(path_bc, &cachedData); // read origin source file length from .bc file @@ -896,7 +896,7 @@ namespace se { assert(!path.empty()); assert(_fileOperationDelegate.isValid()); - if (!cocos2d::FileUtils::getInstance()->isFileExist(path)) { + if (!cc::FileUtils::getInstance()->isFileExist(path)) { std::stringstream ss; ss << "throw new Error(\"Failed to require file '" << path << "', not found!\");"; diff --git a/native/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_io.cc b/native/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_io.cc index 2d0b6dfcce..03e65b8e54 100644 --- a/native/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_io.cc +++ b/native/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_io.cc @@ -92,7 +92,7 @@ std::string StringViewToUtf8(const StringView& view) { std::u16string u16Str((char16_t*)source); std::string ret; - cocos2d::StringUtils::UTF16ToUTF8(u16Str, ret); + cc::StringUtils::UTF16ToUTF8(u16Str, ret); return ret; // const UChar* unicodeSource = reinterpret_cast(source); // static_assert(sizeof(*source) == sizeof(*unicodeSource), @@ -143,7 +143,7 @@ std::unique_ptr Utf8ToStringView(const std::string& message) { // UnicodeString::fromUTF8(StringPiece(message.data(), message.length())); std::u16string u16Str; - cocos2d::StringUtils::UTF8ToUTF16(message, u16Str); + cc::StringUtils::UTF8ToUTF16(message, u16Str); // StringView view(reinterpret_cast(utf16.getBuffer()), // utf16.length()); diff --git a/native/cocos/scripting/js-bindings/manual/JavaScriptJavaBridge.cpp b/native/cocos/scripting/js-bindings/manual/JavaScriptJavaBridge.cpp index a4282165c9..4cbadf32ff 100644 --- a/native/cocos/scripting/js-bindings/manual/JavaScriptJavaBridge.cpp +++ b/native/cocos/scripting/js-bindings/manual/JavaScriptJavaBridge.cpp @@ -54,7 +54,7 @@ JNIEXPORT jint JNICALL JNI_JSJAVABRIDGE(evalString) se::AutoHandleScope hs; bool strFlag = false; - std::string strValue = cocos2d::StringUtils::getStringUTFCharsJNI(env, value, &strFlag); + std::string strValue = cc::StringUtils::getStringUTFCharsJNI(env, value, &strFlag); if (!strFlag) { CCLOG("JavaScriptJavaBridge_evalString error, invalid string code"); @@ -218,7 +218,7 @@ bool JavaScriptJavaBridge::CallInfo::execute() m_retjstring = (jstring)m_env->CallStaticObjectMethod(m_classID, m_methodID); if (m_retjstring) { - std::string strValue = cocos2d::StringUtils::getStringUTFCharsJNI(m_env, m_retjstring); + std::string strValue = cc::StringUtils::getStringUTFCharsJNI(m_env, m_retjstring); m_ret.stringValue = new std::string(strValue); } else @@ -272,7 +272,7 @@ bool JavaScriptJavaBridge::CallInfo::executeWithArgs(jvalue *args) case JavaScriptJavaBridge::ValueType::STRING: { m_retjstring = (jstring)m_env->CallStaticObjectMethodA(m_classID, m_methodID, args); - std::string strValue = cocos2d::StringUtils::getStringUTFCharsJNI(m_env, m_retjstring); + std::string strValue = cc::StringUtils::getStringUTFCharsJNI(m_env, m_retjstring); m_ret.stringValue = new std::string(strValue); break; } @@ -375,7 +375,7 @@ bool JavaScriptJavaBridge::CallInfo::getMethodInfo() m_methodID = 0; m_env = 0; - JavaVM* jvm = cocos2d::JniHelper::getJavaVM(); + JavaVM* jvm = cc::JniHelper::getJavaVM(); jint ret = jvm->GetEnv((void**)&m_env, JNI_VERSION_1_4); switch (ret) { case JNI_OK: @@ -397,8 +397,8 @@ bool JavaScriptJavaBridge::CallInfo::getMethodInfo() return false; } jstring _jstrClassName = m_env->NewStringUTF(m_className.c_str()); - m_classID = (jclass) m_env->CallObjectMethod(cocos2d::JniHelper::classloader, - cocos2d::JniHelper::loadclassMethod_methodID, + m_classID = (jclass) m_env->CallObjectMethod(cc::JniHelper::classloader, + cc::JniHelper::loadclassMethod_methodID, _jstrClassName); if (NULL == m_classID) { diff --git a/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_extension_manual.cpp b/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_extension_manual.cpp index c605fe719b..eea5da1ee2 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_extension_manual.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_extension_manual.cpp @@ -33,8 +33,8 @@ #include "cocos2d.h" #include "extensions/cocos-ext.h" -using namespace cocos2d; -using namespace cocos2d::extension; +using namespace cc; +using namespace cc::extension; static bool js_cocos2dx_extension_loadRemoteImage(se::State& s) { @@ -94,8 +94,8 @@ static bool js_cocos2dx_extension_loadRemoteImage(se::State& s) } else { - auto downloader = new (std::nothrow) cocos2d::network::Downloader(); - downloader->onDataTaskSuccess = [downloader, url, onSuccess, onError](const cocos2d::network::DownloadTask& task, std::vector& data){ + auto downloader = new (std::nothrow) cc::network::Downloader(); + downloader->onDataTaskSuccess = [downloader, url, onSuccess, onError](const cc::network::DownloadTask& task, std::vector& data){ Image* img = new (std::nothrow) Image(); Texture2D* tex = nullptr; do @@ -123,7 +123,7 @@ static bool js_cocos2dx_extension_loadRemoteImage(se::State& s) }); }; - downloader->onTaskError = [downloader, onError](const cocos2d::network::DownloadTask& task, int errorCode, int errorCodeInternal, const std::string& errorStr) + downloader->onTaskError = [downloader, onError](const cc::network::DownloadTask& task, int errorCode, int errorCodeInternal, const std::string& errorStr) { onError(); @@ -156,7 +156,7 @@ static bool js_cocos2dx_extension_initRemoteImage(se::State& s) bool ok = false; // get texture - cocos2d::Texture2D* texture = nullptr; + cc::Texture2D* texture = nullptr; ok = seval_to_native_ptr(args[0], &texture); SE_PRECONDITION2(ok, false, "Converting 'texture' failed!"); @@ -181,8 +181,8 @@ static bool js_cocos2dx_extension_initRemoteImage(se::State& s) func.toObject()->call(args, nullptr); }; - auto downloader = new (std::nothrow) cocos2d::network::Downloader(); - downloader->onDataTaskSuccess = [=](const cocos2d::network::DownloadTask& task, std::vector& data) + auto downloader = new (std::nothrow) cc::network::Downloader(); + downloader->onDataTaskSuccess = [=](const cc::network::DownloadTask& task, std::vector& data) { bool success = false; @@ -206,7 +206,7 @@ static bool js_cocos2dx_extension_initRemoteImage(se::State& s) }); }; - downloader->onTaskError = [=](const cocos2d::network::DownloadTask& task, int errorCode, int errorCodeInternal, const std::string& errorStr) + downloader->onTaskError = [=](const cc::network::DownloadTask& task, int errorCode, int errorCodeInternal, const std::string& errorStr) { onCallback(false); Director::getInstance()->getScheduler()->performFunctionInCocosThread([downloader](){ @@ -226,9 +226,9 @@ static ThreadPool* getThreadPool() if (_threadPool == nullptr) { _threadPool = ThreadPool::newSingleThreadPool(); - _resetThreadPoolListener = Director::getInstance()->getEventDispatcher()->addCustomEventListener(Director::EVENT_RESET, [](cocos2d::EventCustom*){ + _resetThreadPoolListener = Director::getInstance()->getEventDispatcher()->addCustomEventListener(Director::EVENT_RESET, [](cc::EventCustom*){ CC_SAFE_DELETE(_threadPool); - cocos2d::Director::getInstance()->getEventDispatcher()->removeEventListener(_resetThreadPoolListener); + cc::Director::getInstance()->getEventDispatcher()->removeEventListener(_resetThreadPoolListener); _resetThreadPoolListener = nullptr; }); } diff --git a/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_manual.cpp b/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_manual.cpp index fd3e6c05c8..2f1b5076f4 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_manual.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_manual.cpp @@ -33,15 +33,15 @@ #include "storage/local-storage/LocalStorage.h" #include "cocos2d.h" -using namespace cocos2d; +using namespace cc; -static bool jsb_cocos2dx_empty_func(se::State& s) +static bool jsb_ccx_empty_func(se::State& s) { return true; } -SE_BIND_FUNC(jsb_cocos2dx_empty_func) +SE_BIND_FUNC(jsb_ccx_empty_func) -class __JSPlistDelegator: public cocos2d::SAXDelegator +class __JSPlistDelegator: public cc::SAXDelegator { public: static __JSPlistDelegator* getInstance() { @@ -54,7 +54,7 @@ public: virtual ~__JSPlistDelegator(); - cocos2d::SAXParser* getParser(); + cc::SAXParser* getParser(); std::string parse(const std::string& path); std::string parseText(const std::string& text); @@ -65,7 +65,7 @@ public: void textHandler(void *ctx, const char *ch, int len) override; private: - cocos2d::SAXParser _parser; + cc::SAXParser _parser; std::string _result; bool _isStoringCharacters; std::string _currentValue; @@ -78,7 +78,7 @@ static bool js_PlistParser_getInstance(se::State& s) SAXParser* parser = delegator->getParser(); if (parser) { - native_ptr_to_rooted_seval(parser, __jsb_cocos2d_SAXParser_class, &s.rval()); + native_ptr_to_rooted_seval(parser, __jsb_cc_SAXParser_class, &s.rval()); return true; } return false; @@ -113,7 +113,7 @@ static bool js_PlistParser_parse(se::State& s) } SE_BIND_FUNC(js_PlistParser_parse) -cocos2d::SAXParser* __JSPlistDelegator::getParser() { +cc::SAXParser* __JSPlistDelegator::getParser() { return &_parser; } @@ -206,7 +206,7 @@ static bool register_plist_parser(se::Object* obj) assert(v.isObject()); v.toObject()->defineFunction("getInstance", _SE(js_PlistParser_getInstance)); - __jsb_cocos2d_SAXParser_proto->defineFunction("parse", _SE(js_PlistParser_parse)); + __jsb_cc_SAXParser_proto->defineFunction("parse", _SE(js_PlistParser_parse)); se::ScriptEngine::getInstance()->clearException(); @@ -354,7 +354,7 @@ static bool register_sys_localStorage(se::Object* obj) localStorageObj->defineFunction("key", _SE(JSB_localStorageKey)); localStorageObj->defineProperty("length", _SE(JSB_localStorage_getLength), nullptr); - std::string strFilePath = cocos2d::FileUtils::getInstance()->getWritablePath(); + std::string strFilePath = cc::FileUtils::getInstance()->getWritablePath(); strFilePath += "/jsb.sqlite"; localStorageInit(strFilePath); @@ -370,7 +370,7 @@ static bool register_sys_localStorage(se::Object* obj) #define BIND_PROP_WITH_TYPE__CONV_FUNC__RETURN(cls, property, type, convertFunc, returnFunc) \ static bool js_##cls_set_##property(se::State& s) \ { \ - cocos2d::cls* cobj = (cocos2d::cls*)s.nativeThisObject(); \ + cc::cls* cobj = (cc::cls*)s.nativeThisObject(); \ SE_PRECONDITION2(cobj, false, "js_#cls_set_#property : Invalid Native Object"); \ const auto& args = s.args(); \ size_t argc = args.size(); \ @@ -389,7 +389,7 @@ SE_BIND_PROP_SET(js_##cls_set_##property) \ \ static bool js_##cls_get_##property(se::State& s) \ { \ - cocos2d::cls* cobj = (cocos2d::cls*)s.nativeThisObject(); \ + cc::cls* cobj = (cc::cls*)s.nativeThisObject(); \ SE_PRECONDITION2(cobj, false, "js_#cls_get_#property : Invalid Native Object"); \ s.rval().returnFunc(cobj->_##property); \ return true; \ @@ -410,25 +410,25 @@ BIND_PROP_WITH_TYPE__CONV_FUNC__RETURN(CanvasRenderingContext2D, globalComposite #define _SE_DEFINE_PROP(cls, property) \ - __jsb_cocos2d_##cls##_proto->defineProperty(#property, _SE(js_##cls_get_##property), _SE(js_##cls_set_##property)); + __jsb_cc_##cls##_proto->defineProperty(#property, _SE(js_##cls_get_##property), _SE(js_##cls_set_##property)); //IDEA: move to auto bindings. static bool js_CanvasRenderingContext2D_setCanvasBufferUpdatedCallback(se::State& s) { - cocos2d::CanvasRenderingContext2D* cobj = (cocos2d::CanvasRenderingContext2D*)s.nativeThisObject(); + cc::CanvasRenderingContext2D* cobj = (cc::CanvasRenderingContext2D*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_CanvasRenderingContext2D_setCanvasBufferUpdatedCallback : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - std::function arg0; + std::function arg0; do { if (args[0].isObject() && args[0].toObject()->isFunction()) { se::Value jsThis(s.thisObject()); se::Value jsFunc(args[0]); jsThis.toObject()->attachObject(jsFunc.toObject()); - auto lambda = [=](const cocos2d::Data & larg0) -> void { + auto lambda = [=](const cc::Data & larg0) -> void { se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; @@ -527,7 +527,7 @@ static bool register_canvas_context2d(se::Object* obj) _SE_DEFINE_PROP(CanvasRenderingContext2D, strokeStyle) _SE_DEFINE_PROP(CanvasRenderingContext2D, globalCompositeOperation) - __jsb_cocos2d_CanvasRenderingContext2D_proto->defineFunction("_setCanvasBufferUpdatedCallback", _SE(js_CanvasRenderingContext2D_setCanvasBufferUpdatedCallback)); + __jsb_cc_CanvasRenderingContext2D_proto->defineFunction("_setCanvasBufferUpdatedCallback", _SE(js_CanvasRenderingContext2D_setCanvasBufferUpdatedCallback)); se::ScriptEngine::getInstance()->clearException(); diff --git a/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_network_manual.cpp b/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_network_manual.cpp index 8db394dced..f605e8514e 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_network_manual.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_cocos2dx_network_manual.cpp @@ -31,7 +31,7 @@ #include "scripting/js-bindings/auto/jsb_cocos2dx_network_auto.hpp" static bool js_cocos2dx_network_Downloader_createDownloadFileTask(se::State &s) { - cocos2d::network::Downloader *cobj = (cocos2d::network::Downloader *) s.nativeThisObject(); + cc::network::Downloader *cobj = (cc::network::Downloader *) s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_network_Downloader_createDownloadFileTask : Invalid Native Object"); const auto &args = s.args(); @@ -44,7 +44,7 @@ static bool js_cocos2dx_network_Downloader_createDownloadFileTask(se::State &s) ok &= seval_to_std_string(args[1], &arg1); SE_PRECONDITION2(ok, false, "js_network_Downloader_createDownloadFileTask : Error processing arguments"); - std::shared_ptr result = cobj->createDownloadFileTask( + std::shared_ptr result = cobj->createDownloadFileTask( arg0, arg1); ok &= DownloadTask_to_seval(*result, &s.rval()); //ROOT downloader object @@ -63,7 +63,7 @@ static bool js_cocos2dx_network_Downloader_createDownloadFileTask(se::State &s) ok &= seval_to_std_string(args[2], &arg2); SE_PRECONDITION2(ok, false, "js_network_Downloader_createDownloadFileTask : Error processing arguments"); - std::shared_ptr result = cobj->createDownloadFileTask( + std::shared_ptr result = cobj->createDownloadFileTask( arg0, arg1, arg2); ok &= DownloadTask_to_seval(*result, &s.rval()); //ROOT downloader object @@ -81,20 +81,20 @@ SE_BIND_FUNC(js_cocos2dx_network_Downloader_createDownloadFileTask) static bool js_network_Downloader_setOnFileTaskSuccess(se::State& s) { - cocos2d::network::Downloader* cobj = (cocos2d::network::Downloader*)s.nativeThisObject(); + cc::network::Downloader* cobj = (cc::network::Downloader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_network_Downloader_setOnFileTaskSuccess : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - std::function arg0; + std::function arg0; do { if (args[0].isObject() && args[0].toObject()->isFunction()) { se::Value jsThis(s.thisObject()); se::Value jsFunc(args[0]); jsThis.toObject()->attachObject(jsFunc.toObject()); - auto lambda = [=](const cocos2d::network::DownloadTask & larg0) -> void { + auto lambda = [=](const cc::network::DownloadTask & larg0) -> void { se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; @@ -131,20 +131,20 @@ SE_BIND_FUNC(js_network_Downloader_setOnFileTaskSuccess) static bool js_network_Downloader_setOnTaskError(se::State& s) { - cocos2d::network::Downloader* cobj = (cocos2d::network::Downloader*)s.nativeThisObject(); + cc::network::Downloader* cobj = (cc::network::Downloader*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_network_Downloader_setOnTaskError : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 1) { - std::function arg0; + std::function arg0; do { if (args[0].isObject() && args[0].toObject()->isFunction()) { se::Value jsThis(s.thisObject()); se::Value jsFunc(args[0]); jsThis.toObject()->attachObject(jsFunc.toObject()); - auto lambda = [=](const cocos2d::network::DownloadTask & larg0, int larg1, int larg2, const std::string& larg3) -> void { + auto lambda = [=](const cc::network::DownloadTask & larg0, int larg1, int larg2, const std::string& larg3) -> void { se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; @@ -182,11 +182,11 @@ static bool js_network_Downloader_setOnTaskError(se::State& s) SE_BIND_FUNC(js_network_Downloader_setOnTaskError) bool register_all_cocos2dx_network_manual(se::Object *obj) { - __jsb_cocos2d_network_Downloader_proto->defineFunction("createDownloadFileTask", + __jsb_cc_network_Downloader_proto->defineFunction("createDownloadFileTask", _SE(js_cocos2dx_network_Downloader_createDownloadFileTask)); - __jsb_cocos2d_network_Downloader_proto->defineFunction("setOnTaskError", + __jsb_cc_network_Downloader_proto->defineFunction("setOnTaskError", _SE(js_network_Downloader_setOnTaskError)); - __jsb_cocos2d_network_Downloader_proto->defineFunction("setOnFileTaskSuccess", + __jsb_cc_network_Downloader_proto->defineFunction("setOnFileTaskSuccess", _SE(js_network_Downloader_setOnFileTaskSuccess)); return true; } diff --git a/native/cocos/scripting/js-bindings/manual/jsb_conversions.cpp b/native/cocos/scripting/js-bindings/manual/jsb_conversions.cpp index ff3103d400..f9920c83fb 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_conversions.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_conversions.cpp @@ -255,7 +255,7 @@ bool seval_to_std_string(const se::Value& v, std::string* ret) return true; } -bool seval_to_Vec2(const se::Value& v, cocos2d::Vec2* pt) +bool seval_to_Vec2(const se::Value& v, cc::Vec2* pt) { assert(pt != nullptr); SE_PRECONDITION2(v.isObject(), false, "Convert parameter to Vec2 failed!"); @@ -263,15 +263,15 @@ bool seval_to_Vec2(const se::Value& v, cocos2d::Vec2* pt) se::Value x; se::Value y; bool ok = obj->getProperty("x", &x); - SE_PRECONDITION3(ok && x.isNumber(), false, *pt = cocos2d::Vec2::ZERO); + SE_PRECONDITION3(ok && x.isNumber(), false, *pt = cc::Vec2::ZERO); ok = obj->getProperty("y", &y); - SE_PRECONDITION3(ok && y.isNumber(), false, *pt = cocos2d::Vec2::ZERO); + SE_PRECONDITION3(ok && y.isNumber(), false, *pt = cc::Vec2::ZERO); pt->x = x.toFloat(); pt->y = y.toFloat(); return true; } -bool seval_to_Vec3(const se::Value& v, cocos2d::Vec3* pt) +bool seval_to_Vec3(const se::Value& v, cc::Vec3* pt) { assert(pt != nullptr); SE_PRECONDITION2(v.isObject(), false, "Convert parameter to Vec3 failed!"); @@ -280,18 +280,18 @@ bool seval_to_Vec3(const se::Value& v, cocos2d::Vec3* pt) se::Value y; se::Value z; bool ok = obj->getProperty("x", &x); - SE_PRECONDITION3(ok && x.isNumber(), false, *pt = cocos2d::Vec3::ZERO); + SE_PRECONDITION3(ok && x.isNumber(), false, *pt = cc::Vec3::ZERO); ok = obj->getProperty("y", &y); - SE_PRECONDITION3(ok && y.isNumber(), false, *pt = cocos2d::Vec3::ZERO); + SE_PRECONDITION3(ok && y.isNumber(), false, *pt = cc::Vec3::ZERO); ok = obj->getProperty("z", &z); - SE_PRECONDITION3(ok && z.isNumber(), false, *pt = cocos2d::Vec3::ZERO); + SE_PRECONDITION3(ok && z.isNumber(), false, *pt = cc::Vec3::ZERO); pt->x = x.toFloat(); pt->y = y.toFloat(); pt->z = z.toFloat(); return true; } -bool seval_to_Vec4(const se::Value& v, cocos2d::Vec4* pt) +bool seval_to_Vec4(const se::Value& v, cc::Vec4* pt) { assert(pt != nullptr); SE_PRECONDITION2(v.isObject(), false, "Convert parameter to Vec4 failed!"); @@ -302,13 +302,13 @@ bool seval_to_Vec4(const se::Value& v, cocos2d::Vec4* pt) se::Value z; se::Value w; bool ok = obj->getProperty("x", &x); - SE_PRECONDITION3(ok && x.isNumber(), false, *pt = cocos2d::Vec4::ZERO); + SE_PRECONDITION3(ok && x.isNumber(), false, *pt = cc::Vec4::ZERO); ok = obj->getProperty("y", &y); - SE_PRECONDITION3(ok && y.isNumber(), false, *pt = cocos2d::Vec4::ZERO); + SE_PRECONDITION3(ok && y.isNumber(), false, *pt = cc::Vec4::ZERO); ok = obj->getProperty("z", &z); - SE_PRECONDITION3(ok && z.isNumber(), false, *pt = cocos2d::Vec4::ZERO); + SE_PRECONDITION3(ok && z.isNumber(), false, *pt = cc::Vec4::ZERO); ok = obj->getProperty("w", &w); - SE_PRECONDITION3(ok && w.isNumber(), false, *pt = cocos2d::Vec4::ZERO); + SE_PRECONDITION3(ok && w.isNumber(), false, *pt = cc::Vec4::ZERO); pt->x = x.toFloat(); pt->y = y.toFloat(); pt->z = z.toFloat(); @@ -334,7 +334,7 @@ bool seval_to_mat(const se::Value& v, int length, float* out) return true; } -bool seval_to_Mat4(const se::Value& v, cocos2d::Mat4* mat) +bool seval_to_Mat4(const se::Value& v, cc::Mat4* mat) { assert(mat != nullptr); SE_PRECONDITION2(v.isObject(), false, "Convert parameter to Matrix4 failed!"); @@ -367,7 +367,7 @@ bool seval_to_Mat4(const se::Value& v, cocos2d::Mat4* mat) name = prefix + std::to_string(i); } ok = obj->getProperty(name.c_str(), &tmp); - SE_PRECONDITION3(ok, false, *mat = cocos2d::Mat4::IDENTITY); + SE_PRECONDITION3(ok, false, *mat = cc::Mat4::IDENTITY); if (tmp.isNumber()) { @@ -376,7 +376,7 @@ bool seval_to_Mat4(const se::Value& v, cocos2d::Mat4* mat) else { SE_REPORT_ERROR("%u, not supported type in matrix", i); - *mat = cocos2d::Mat4::IDENTITY; + *mat = cc::Mat4::IDENTITY; return false; } @@ -424,7 +424,7 @@ bool seval_to_uintptr_t(const se::Value& v, uintptr_t* ret) return false; } -bool seval_to_Size(const se::Value& v, cocos2d::Size* size) +bool seval_to_Size(const se::Value& v, cc::Size* size) { assert(size != nullptr); SE_PRECONDITION2(v.isObject(), false, "Convert parameter to Size failed!"); @@ -433,15 +433,15 @@ bool seval_to_Size(const se::Value& v, cocos2d::Size* size) se::Value height; bool ok = obj->getProperty("width", &width); - SE_PRECONDITION3(ok && width.isNumber(), false, *size = cocos2d::Size::ZERO); + SE_PRECONDITION3(ok && width.isNumber(), false, *size = cc::Size::ZERO); ok = obj->getProperty("height", &height); - SE_PRECONDITION3(ok && height.isNumber(), false, *size = cocos2d::Size::ZERO); + SE_PRECONDITION3(ok && height.isNumber(), false, *size = cc::Size::ZERO); size->width = width.toFloat(); size->height = height.toFloat(); return true; } -bool seval_to_ccvalue(const se::Value& v, cocos2d::Value* ret) +bool seval_to_ccvalue(const se::Value& v, cc::Value* ret) { assert(ret != nullptr); bool ok = true; @@ -451,18 +451,18 @@ bool seval_to_ccvalue(const se::Value& v, cocos2d::Value* ret) if (!jsobj->isArray()) { // It's a normal js object. - cocos2d::ValueMap dictVal; + cc::ValueMap dictVal; ok = seval_to_ccvaluemap(v, &dictVal); - SE_PRECONDITION3(ok, false, *ret = cocos2d::Value::Null); - *ret = cocos2d::Value(dictVal); + SE_PRECONDITION3(ok, false, *ret = cc::Value::Null); + *ret = cc::Value(dictVal); } else { // It's a js array object. - cocos2d::ValueVector arrVal; + cc::ValueVector arrVal; ok = seval_to_ccvaluevector(v, &arrVal); - SE_PRECONDITION3(ok, false, *ret = cocos2d::Value::Null); - *ret = cocos2d::Value(arrVal); + SE_PRECONDITION3(ok, false, *ret = cc::Value::Null); + *ret = cc::Value(arrVal); } } else if (v.isString()) @@ -479,7 +479,7 @@ bool seval_to_ccvalue(const se::Value& v, cocos2d::Value* ret) } else if (v.isNullOrUndefined()) { - *ret = cocos2d::Value::Null; + *ret = cc::Value::Null; } else { @@ -489,7 +489,7 @@ bool seval_to_ccvalue(const se::Value& v, cocos2d::Value* ret) return ok; } -bool seval_to_ccvaluemap(const se::Value& v, cocos2d::ValueMap* ret) +bool seval_to_ccvaluemap(const se::Value& v, cc::ValueMap* ret) { assert(ret != nullptr); @@ -504,14 +504,14 @@ bool seval_to_ccvaluemap(const se::Value& v, cocos2d::ValueMap* ret) se::Object* obj = v.toObject(); - cocos2d::ValueMap& dict = *ret; + cc::ValueMap& dict = *ret; std::vector allKeys; SE_PRECONDITION3(obj->getAllKeys(&allKeys), false, ret->clear()); bool ok = false; se::Value value; - cocos2d::Value ccvalue; + cc::Value ccvalue; for (const auto& key : allKeys) { SE_PRECONDITION3(obj->getProperty(key.c_str(), &value), false, ret->clear()); @@ -533,7 +533,7 @@ static bool isNumberString(const std::string& str) return true; } -bool seval_to_ccvaluemapintkey(const se::Value& v, cocos2d::ValueMapIntKey* ret) +bool seval_to_ccvaluemapintkey(const se::Value& v, cc::ValueMapIntKey* ret) { assert(ret != nullptr); if (v.isNullOrUndefined()) @@ -547,14 +547,14 @@ bool seval_to_ccvaluemapintkey(const se::Value& v, cocos2d::ValueMapIntKey* ret) se::Object* obj = v.toObject(); - cocos2d::ValueMapIntKey& dict = *ret; + cc::ValueMapIntKey& dict = *ret; std::vector allKeys; SE_PRECONDITION3(obj->getAllKeys(&allKeys), false, ret->clear()); bool ok = false; se::Value value; - cocos2d::Value ccvalue; + cc::Value ccvalue; for (const auto& key : allKeys) { SE_PRECONDITION3(obj->getProperty(key.c_str(), &value), false, ret->clear()); @@ -575,7 +575,7 @@ bool seval_to_ccvaluemapintkey(const se::Value& v, cocos2d::ValueMapIntKey* ret) return true; } -bool seval_to_ccvaluevector(const se::Value& v, cocos2d::ValueVector* ret) +bool seval_to_ccvaluevector(const se::Value& v, cc::ValueVector* ret) { assert(ret != nullptr); @@ -589,7 +589,7 @@ bool seval_to_ccvaluevector(const se::Value& v, cocos2d::ValueVector* ret) bool ok = false; se::Value value; - cocos2d::Value ccvalue; + cc::Value ccvalue; for (uint32_t i = 0; i < len; ++i) { if (obj->getArrayElement(i, &value)) @@ -603,10 +603,10 @@ bool seval_to_ccvaluevector(const se::Value& v, cocos2d::ValueVector* ret) return true; } -bool sevals_variadic_to_ccvaluevector(const se::ValueArray& args, cocos2d::ValueVector* ret) +bool sevals_variadic_to_ccvaluevector(const se::ValueArray& args, cc::ValueVector* ret) { bool ok = false; - cocos2d::Value ccvalue; + cc::Value ccvalue; for (const auto& arg : args) { @@ -791,7 +791,7 @@ bool seval_to_std_vector_float(const se::Value& v, std::vector* ret) return true; } -bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* ret) +bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* ret) { assert(ret != nullptr); SE_PRECONDITION2(v.isObject(), false, "Convert parameter to vector of Vec2 failed!"); @@ -801,7 +801,7 @@ bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* re if (obj->getArrayLength(&len)) { se::Value value; - cocos2d::Vec2 pt; + cc::Vec2 pt; for (uint32_t i = 0; i < len; ++i) { SE_PRECONDITION3(obj->getArrayElement(i, &value) && seval_to_Vec2(value, &pt), false, ret->clear()); @@ -846,7 +846,7 @@ bool seval_to_std_map_string_string(const se::Value& v, std::mapisTypedArray(), false, "Convert parameter to Data failed!"); @@ -865,9 +865,9 @@ bool seval_to_Data(const se::Value& v, cocos2d::Data* ret) return ok; } -bool seval_to_DownloaderHints(const se::Value& v, cocos2d::network::DownloaderHints* ret) +bool seval_to_DownloaderHints(const se::Value& v, cc::network::DownloaderHints* ret) { - static cocos2d::network::DownloaderHints ZERO = {0, 0, ""}; + static cc::network::DownloaderHints ZERO = {0, 0, ""}; assert(ret != nullptr); SE_PRECONDITION2(v.isObject(), false, "Convert parameter to DownloaderHints failed!"); se::Value tmp; @@ -992,7 +992,7 @@ bool std_string_to_seval(const std::string& v, se::Value* ret) return true; } -bool Vec2_to_seval(const cocos2d::Vec2& v, se::Value* ret) +bool Vec2_to_seval(const cc::Vec2& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject obj(se::Object::createPlainObject()); @@ -1003,7 +1003,7 @@ bool Vec2_to_seval(const cocos2d::Vec2& v, se::Value* ret) return true; } -bool Vec3_to_seval(const cocos2d::Vec3& v, se::Value* ret) +bool Vec3_to_seval(const cc::Vec3& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject obj(se::Object::createPlainObject()); @@ -1015,7 +1015,7 @@ bool Vec3_to_seval(const cocos2d::Vec3& v, se::Value* ret) return true; } -bool Vec4_to_seval(const cocos2d::Vec4& v, se::Value* ret) +bool Vec4_to_seval(const cc::Vec4& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject obj(se::Object::createPlainObject()); @@ -1028,7 +1028,7 @@ bool Vec4_to_seval(const cocos2d::Vec4& v, se::Value* ret) return true; } -bool Mat4_to_seval(const cocos2d::Mat4& v, se::Value* ret) +bool Mat4_to_seval(const cc::Mat4& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject obj(se::Object::createArrayObject(16)); @@ -1042,7 +1042,7 @@ bool Mat4_to_seval(const cocos2d::Mat4& v, se::Value* ret) return true; } -bool Size_to_seval(const cocos2d::Size& v, se::Value* ret) +bool Size_to_seval(const cc::Size& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject obj(se::Object::createPlainObject()); @@ -1052,7 +1052,7 @@ bool Size_to_seval(const cocos2d::Size& v, se::Value* ret) return true; } -bool Rect_to_seval(const cocos2d::Rect& v, se::Value* ret) +bool Rect_to_seval(const cc::Rect& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject obj(se::Object::createPlainObject()); @@ -1065,42 +1065,42 @@ bool Rect_to_seval(const cocos2d::Rect& v, se::Value* ret) return true; } -bool ccvalue_to_seval(const cocos2d::Value& v, se::Value* ret) +bool ccvalue_to_seval(const cc::Value& v, se::Value* ret) { assert(ret != nullptr); bool ok = true; switch (v.getType()) { - case cocos2d::Value::Type::NONE: + case cc::Value::Type::NONE: ret->setNull(); break; - case cocos2d::Value::Type::UNSIGNED: + case cc::Value::Type::UNSIGNED: ret->setUint32(v.asUnsignedInt()); break; - case cocos2d::Value::Type::BOOLEAN: + case cc::Value::Type::BOOLEAN: ret->setBoolean(v.asBool()); break; - case cocos2d::Value::Type::FLOAT: - case cocos2d::Value::Type::DOUBLE: + case cc::Value::Type::FLOAT: + case cc::Value::Type::DOUBLE: ret->setNumber(v.asDouble()); break; - case cocos2d::Value::Type::INTEGER: + case cc::Value::Type::INTEGER: ret->setInt32(v.asInt()); break; - case cocos2d::Value::Type::STRING: + case cc::Value::Type::STRING: ret->setString(v.asString()); break; - case cocos2d::Value::Type::VECTOR: + case cc::Value::Type::VECTOR: ok = ccvaluevector_to_seval(v.asValueVector(), ret); break; - case cocos2d::Value::Type::MAP: + case cc::Value::Type::MAP: ok = ccvaluemap_to_seval(v.asValueMap(), ret); break; - case cocos2d::Value::Type::INT_KEY_MAP: + case cc::Value::Type::INT_KEY_MAP: ok = ccvaluemapintkey_to_seval(v.asIntKeyMap(), ret); break; default: - SE_LOGE("Could not the way to convert cocos2d::Value::Type (%d) type!", (int)v.getType()); + SE_LOGE("Could not the way to convert cc::Value::Type (%d) type!", (int)v.getType()); ok = false; break; } @@ -1108,7 +1108,7 @@ bool ccvalue_to_seval(const cocos2d::Value& v, se::Value* ret) return ok; } -bool ccvaluemap_to_seval(const cocos2d::ValueMap& v, se::Value* ret) +bool ccvaluemap_to_seval(const cc::ValueMap& v, se::Value* ret) { assert(ret != nullptr); @@ -1117,7 +1117,7 @@ bool ccvaluemap_to_seval(const cocos2d::ValueMap& v, se::Value* ret) for (const auto& e : v) { const std::string& key = e.first; - const cocos2d::Value& value = e.second; + const cc::Value& value = e.second; if (key.empty()) continue; @@ -1138,7 +1138,7 @@ bool ccvaluemap_to_seval(const cocos2d::ValueMap& v, se::Value* ret) return ok; } -bool ccvaluemapintkey_to_seval(const cocos2d::ValueMapIntKey& v, se::Value* ret) +bool ccvaluemapintkey_to_seval(const cc::ValueMapIntKey& v, se::Value* ret) { assert(ret != nullptr); @@ -1149,7 +1149,7 @@ bool ccvaluemapintkey_to_seval(const cocos2d::ValueMapIntKey& v, se::Value* ret) std::stringstream keyss; keyss << e.first; std::string key = keyss.str(); - const cocos2d::Value& value = e.second; + const cc::Value& value = e.second; if (key.empty()) continue; @@ -1170,7 +1170,7 @@ bool ccvaluemapintkey_to_seval(const cocos2d::ValueMapIntKey& v, se::Value* ret) return ok; } -bool ccvaluevector_to_seval(const cocos2d::ValueVector& v, se::Value* ret) +bool ccvaluevector_to_seval(const cc::ValueVector& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject obj(se::Object::createArrayObject(v.size())); @@ -1288,7 +1288,7 @@ namespace { int32_t* intptr = (int32_t*)data; float* floatptr = (float*)data; - cocos2d::Vec2 vec2; + cc::Vec2 vec2; if (DataType::INT == type) { vec2.x = *intptr; @@ -1307,7 +1307,7 @@ namespace { int32_t* intptr = (int32_t*)data; float* floatptr = (float*)data; - cocos2d::Vec3 vec3; + cc::Vec3 vec3; if (DataType::INT == type) { vec3.x = *intptr; @@ -1328,7 +1328,7 @@ namespace { int32_t* intptr = (int32_t*)data; float* floatptr = (float*)data; - cocos2d::Vec4 vec4; + cc::Vec4 vec4; if (DataType::INT == type) { vec4.x = *intptr; @@ -1365,7 +1365,7 @@ namespace } } -bool ManifestAsset_to_seval(const cocos2d::extension::ManifestAsset& v, se::Value* ret) +bool ManifestAsset_to_seval(const cc::extension::ManifestAsset& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject obj(se::Object::createPlainObject()); @@ -1379,7 +1379,7 @@ bool ManifestAsset_to_seval(const cocos2d::extension::ManifestAsset& v, se::Valu return true; } -bool Data_to_seval(const cocos2d::Data& v, se::Value* ret) +bool Data_to_seval(const cc::Data& v, se::Value* ret) { assert(ret != nullptr); if (v.isNull()) @@ -1394,7 +1394,7 @@ bool Data_to_seval(const cocos2d::Data& v, se::Value* ret) return true; } -bool DownloadTask_to_seval(const cocos2d::network::DownloadTask& v, se::Value* ret) +bool DownloadTask_to_seval(const cc::network::DownloadTask& v, se::Value* ret) { assert(ret != nullptr); @@ -1406,7 +1406,7 @@ bool DownloadTask_to_seval(const cocos2d::network::DownloadTask& v, se::Value* r return true; } -bool std_vector_EffectDefine_to_seval(const std::vector& v, se::Value* ret) +bool std_vector_EffectDefine_to_seval(const std::vector& v, se::Value* ret) { assert(ret != nullptr); se::HandleObject arr(se::Object::createArrayObject(v.size())); diff --git a/native/cocos/scripting/js-bindings/manual/jsb_conversions.hpp b/native/cocos/scripting/js-bindings/manual/jsb_conversions.hpp index 8319a41dcc..cb43d30376 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_conversions.hpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_conversions.hpp @@ -95,27 +95,27 @@ bool seval_to_longlong(const se::Value& v, long long* ret); bool seval_to_ssize(const se::Value& v, ssize_t* ret); bool seval_to_size(const se::Value& v, size_t* ret); bool seval_to_std_string(const se::Value& v, std::string* ret); -bool seval_to_Vec2(const se::Value& v, cocos2d::Vec2* pt); -bool seval_to_Vec3(const se::Value& v, cocos2d::Vec3* pt); -bool seval_to_Vec4(const se::Value& v, cocos2d::Vec4* pt); -bool seval_to_Mat4(const se::Value& v, cocos2d::Mat4* mat); -bool seval_to_Size(const se::Value& v, cocos2d::Size* size); -bool seval_to_ccvalue(const se::Value& v, cocos2d::Value* ret); -bool seval_to_ccvaluemap(const se::Value& v, cocos2d::ValueMap* ret); -bool seval_to_ccvaluemapintkey(const se::Value& v, cocos2d::ValueMapIntKey* ret); -bool seval_to_ccvaluevector(const se::Value& v, cocos2d::ValueVector* ret); -bool sevals_variadic_to_ccvaluevector(const se::ValueArray& args, cocos2d::ValueVector* ret); +bool seval_to_Vec2(const se::Value& v, cc::Vec2* pt); +bool seval_to_Vec3(const se::Value& v, cc::Vec3* pt); +bool seval_to_Vec4(const se::Value& v, cc::Vec4* pt); +bool seval_to_Mat4(const se::Value& v, cc::Mat4* mat); +bool seval_to_Size(const se::Value& v, cc::Size* size); +bool seval_to_ccvalue(const se::Value& v, cc::Value* ret); +bool seval_to_ccvaluemap(const se::Value& v, cc::ValueMap* ret); +bool seval_to_ccvaluemapintkey(const se::Value& v, cc::ValueMapIntKey* ret); +bool seval_to_ccvaluevector(const se::Value& v, cc::ValueVector* ret); +bool sevals_variadic_to_ccvaluevector(const se::ValueArray& args, cc::ValueVector* ret); bool seval_to_std_vector_string(const se::Value& v, std::vector* ret); bool seval_to_std_vector_int(const se::Value& v, std::vector* ret); bool seval_to_std_vector_uint16(const se::Value& v, std::vector* ret); bool seval_to_std_vector_float(const se::Value& v, std::vector* ret); -bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* ret); +bool seval_to_std_vector_Vec2(const se::Value& v, std::vector* ret); bool seval_to_Uint8Array(const se::Value& v, uint8_t* ret); bool seval_to_uintptr_t(const se::Value& v, uintptr_t* ret); bool seval_to_std_map_string_string(const se::Value& v, std::map* ret); -bool seval_to_Data(const se::Value& v, cocos2d::Data* ret); -bool seval_to_DownloaderHints(const se::Value& v, cocos2d::network::DownloaderHints* ret); +bool seval_to_Data(const se::Value& v, cc::Data* ret); +bool seval_to_DownloaderHints(const se::Value& v, cc::network::DownloaderHints* ret); #if USE_GFX_RENDERER #endif @@ -153,7 +153,7 @@ bool seval_to_native_ptr(const se::Value& v, T* ret) } template -bool seval_to_Vector(const se::Value& v, cocos2d::Vector* ret) +bool seval_to_Vector(const se::Value& v, cc::Vector* ret) { assert(ret != nullptr); assert(v.isObject()); @@ -329,7 +329,7 @@ seval_to_std_vector(const se::Value& v, std::vector* ret) } template -bool seval_to_Map_string_key(const se::Value& v, cocos2d::Map* ret) +bool seval_to_Map_string_key(const se::Value& v, cc::Map* ret) { assert(ret != nullptr); assert(v.isObject()); @@ -379,32 +379,32 @@ bool ssize_to_seval(ssize_t v, se::Value* ret); bool size_to_seval(size_t v, se::Value* ret); bool std_string_to_seval(const std::string& v, se::Value* ret); -bool Vec2_to_seval(const cocos2d::Vec2& v, se::Value* ret); -bool Vec3_to_seval(const cocos2d::Vec3& v, se::Value* ret); -bool Vec4_to_seval(const cocos2d::Vec4& v, se::Value* ret); -bool Mat4_to_seval(const cocos2d::Mat4& v, se::Value* ret); -bool Size_to_seval(const cocos2d::Size& v, se::Value* ret); -bool Rect_to_seval(const cocos2d::Rect& v, se::Value* ret); -bool ccvalue_to_seval(const cocos2d::Value& v, se::Value* ret); -bool ccvaluemap_to_seval(const cocos2d::ValueMap& v, se::Value* ret); -bool ccvaluemapintkey_to_seval(const cocos2d::ValueMapIntKey& v, se::Value* ret); -bool ccvaluevector_to_seval(const cocos2d::ValueVector& v, se::Value* ret); +bool Vec2_to_seval(const cc::Vec2& v, se::Value* ret); +bool Vec3_to_seval(const cc::Vec3& v, se::Value* ret); +bool Vec4_to_seval(const cc::Vec4& v, se::Value* ret); +bool Mat4_to_seval(const cc::Mat4& v, se::Value* ret); +bool Size_to_seval(const cc::Size& v, se::Value* ret); +bool Rect_to_seval(const cc::Rect& v, se::Value* ret); +bool ccvalue_to_seval(const cc::Value& v, se::Value* ret); +bool ccvaluemap_to_seval(const cc::ValueMap& v, se::Value* ret); +bool ccvaluemapintkey_to_seval(const cc::ValueMapIntKey& v, se::Value* ret); +bool ccvaluevector_to_seval(const cc::ValueVector& v, se::Value* ret); bool std_vector_string_to_seval(const std::vector& v, se::Value* ret); bool std_vector_int_to_seval(const std::vector& v, se::Value* ret); bool std_vector_uint16_to_seval(const std::vector& v, se::Value* ret); bool std_vector_float_to_seval(const std::vector& v, se::Value* ret); bool std_map_string_string_to_seval(const std::map& v, se::Value* ret); -bool ManifestAsset_to_seval(const cocos2d::extension::ManifestAsset& v, se::Value* ret); -bool Data_to_seval(const cocos2d::Data& v, se::Value* ret); -bool DownloadTask_to_seval(const cocos2d::network::DownloadTask& v, se::Value* ret); -bool std_vector_EffectDefine_to_seval(const std::vector& v, se::Value* ret); +bool ManifestAsset_to_seval(const cc::extension::ManifestAsset& v, se::Value* ret); +bool Data_to_seval(const cc::Data& v, se::Value* ret); +bool DownloadTask_to_seval(const cc::network::DownloadTask& v, se::Value* ret); +bool std_vector_EffectDefine_to_seval(const std::vector& v, se::Value* ret); #if USE_GFX_RENDERER #endif template -typename std::enable_if::value,bool>::type +typename std::enable_if::value,bool>::type native_ptr_to_seval(T* v_c, se::Value* ret, bool* isReturnCachedValue = nullptr) { typedef typename std::decay::type>::type DecayT; @@ -446,7 +446,7 @@ native_ptr_to_seval(T* v_c, se::Value* ret, bool* isReturnCachedValue = nullptr) //handle reference template -typename std::enable_if::value && !std::is_pointer::value,bool>::type +typename std::enable_if::value && !std::is_pointer::value,bool>::type native_ptr_to_seval(T& v_ref, se::Value* ret, bool* isReturnCachedValue = nullptr) { typedef typename std::decay::type>::type DecayT; @@ -488,7 +488,7 @@ native_ptr_to_seval(T& v_ref, se::Value* ret, bool* isReturnCachedValue = nullpt } template -bool native_ptr_to_rooted_seval(const typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr) +bool native_ptr_to_rooted_seval(const typename std::enable_if::value,T>::type* v, se::Value* ret, bool* isReturnCachedValue = nullptr) { assert(ret != nullptr); if (v == nullptr) @@ -529,7 +529,7 @@ bool native_ptr_to_rooted_seval(const typename std::enable_if -typename std::enable_if::value,bool>::type +typename std::enable_if::value,bool>::type native_ptr_to_seval(T* vp, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) { typedef typename std::decay::type>::type DecayT; @@ -571,7 +571,7 @@ native_ptr_to_seval(T* vp, se::Class* cls, se::Value* ret, bool* isReturnCachedV //handle ref template -typename std::enable_if::value,bool>::type +typename std::enable_if::value,bool>::type native_ptr_to_seval(T& v_ref, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) { typedef typename std::decay::type>::type DecayT; @@ -615,7 +615,7 @@ native_ptr_to_seval(T& v_ref, se::Class* cls, se::Value* ret, bool* isReturnCach template -bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) +bool native_ptr_to_rooted_seval(typename std::enable_if::value,T>::type* v, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) { assert(ret != nullptr); if (v == nullptr) @@ -655,7 +655,7 @@ bool native_ptr_to_rooted_seval(typename std::enable_if -typename std::enable_if::value, bool>::type +typename std::enable_if::value, bool>::type native_ptr_to_seval(T* vp, se::Value* ret, bool* isReturnCachedValue = nullptr) { typedef typename std::decay::type>::type DecayT; @@ -698,7 +698,7 @@ native_ptr_to_seval(T* vp, se::Value* ret, bool* isReturnCachedValue = nullptr) } template -typename std::enable_if::value,bool>::type +typename std::enable_if::value,bool>::type native_ptr_to_seval(T* vp, se::Class* cls, se::Value* ret, bool* isReturnCachedValue = nullptr) { typedef typename std::decay::type>::type DecayT; diff --git a/native/cocos/scripting/js-bindings/manual/jsb_gfx_manual.cpp b/native/cocos/scripting/js-bindings/manual/jsb_gfx_manual.cpp index f456bad3f5..c47a5d37ac 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_gfx_manual.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_gfx_manual.cpp @@ -49,15 +49,15 @@ #define GFX_INVALID_BINDING ((uint8_t)-1) #define GFX_INVALID_HANDLE ((uint)-1) -bool js_GFXDevice_copyBuffersToTexture(se::State& s, cocos2d::GFXDevice* cobj) +bool js_GFXDevice_copyBuffersToTexture(se::State& s, cc::GFXDevice* cobj) { const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 3) { - cocos2d::GFXDataArray arg0; - cocos2d::GFXTexture* arg1 = nullptr; - std::vector arg2; + cc::GFXDataArray arg0; + cc::GFXTexture* arg1 = nullptr; + std::vector arg2; if (args[0].isObject()) { se::Object* dataObj = args[0].toObject(); @@ -103,15 +103,15 @@ bool js_GFXDevice_copyBuffersToTexture(se::State& s, cocos2d::GFXDevice* cobj) return false; } -bool js_GFXDevice_copyTexImagesToTexture(se::State& s, cocos2d::GFXDevice* cobj) +bool js_GFXDevice_copyTexImagesToTexture(se::State& s, cc::GFXDevice* cobj) { const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 3) { - cocos2d::GFXDataArray arg0; - cocos2d::GFXTexture* arg1 = nullptr; - std::vector arg2; + cc::GFXDataArray arg0; + cc::GFXTexture* arg1 = nullptr; + std::vector arg2; if (args[0].isObject()) { se::Object* dataObj = args[0].toObject(); @@ -126,7 +126,7 @@ bool js_GFXDevice_copyTexImagesToTexture(se::State& s, cocos2d::GFXDevice* cobj) if (dataObj->getArrayElement(i, &value)) { CC_UNUSED size_t dataLength = 0; - cocos2d::Data bufferData; + cc::Data bufferData; ok &= seval_to_Data(value, &bufferData); arg0.datas[i] = bufferData.takeBuffer(); } @@ -148,25 +148,25 @@ bool js_GFXDevice_copyTexImagesToTexture(se::State& s, cocos2d::GFXDevice* cobj) static bool js_gfx_GFXDevice_createTexture(se::State& s) { - cocos2d::GFXDevice* cobj = (cocos2d::GFXDevice*)s.nativeThisObject(); + cc::GFXDevice* cobj = (cc::GFXDevice*)s.nativeThisObject(); SE_PRECONDITION2( cobj, false, "js_gfx_GFXDevice_createTexture : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); if (argc == 2) { - cocos2d::GFXTexture* texture = nullptr; + cc::GFXTexture* texture = nullptr; bool createTextureView = false; seval_to_boolean(args[1], &createTextureView); if (createTextureView) { - auto textureViewInfo = (cocos2d::GFXTextureViewInfo*)(args[0].toObject()->getPrivateData()); + auto textureViewInfo = (cc::GFXTextureViewInfo*)(args[0].toObject()->getPrivateData()); texture = cobj->createTexture(*textureViewInfo); } else { - auto textureInfo = (cocos2d::GFXTextureInfo*)(args[0].toObject()->getPrivateData()); + auto textureInfo = (cc::GFXTextureInfo*)(args[0].toObject()->getPrivateData()); texture = cobj->createTexture(*textureInfo); } @@ -183,7 +183,7 @@ SE_BIND_FUNC(js_gfx_GFXDevice_createTexture) static bool js_gfx_GFXTexture_initialize(se::State& s) { CC_UNUSED bool ok = true; - cocos2d::GFXTexture* cobj = (cocos2d::GFXTexture*)s.nativeThisObject(); + cc::GFXTexture* cobj = (cc::GFXTexture*)s.nativeThisObject(); SE_PRECONDITION2( cobj, false, "js_gfx_GFXTexture_initialize : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -194,12 +194,12 @@ static bool js_gfx_GFXTexture_initialize(se::State& s) if (initWithTextureViewInfo) { - auto textureViewInfo = (cocos2d::GFXTextureViewInfo*)(args[0].toObject()->getPrivateData()); + auto textureViewInfo = (cc::GFXTextureViewInfo*)(args[0].toObject()->getPrivateData()); ok &= cobj->initialize(*textureViewInfo); } else { - auto textureInfo = (cocos2d::GFXTextureInfo*)(args[0].toObject()->getPrivateData()); + auto textureInfo = (cc::GFXTextureInfo*)(args[0].toObject()->getPrivateData()); ok &= cobj->initialize(*textureInfo); } @@ -216,7 +216,7 @@ SE_BIND_FUNC(js_gfx_GFXTexture_initialize) #ifdef USE_VULKAN static bool js_gfx_CCVKDevice_copyBuffersToTexture(se::State& s) { - cocos2d::CCVKDevice* cobj = (cocos2d::CCVKDevice*)s.nativeThisObject(); + cc::CCVKDevice* cobj = (cc::CCVKDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_CCVKDevice_copyBuffersToTexture : Invalid Native Object"); return js_GFXDevice_copyBuffersToTexture(s, cobj); } @@ -224,7 +224,7 @@ SE_BIND_FUNC(js_gfx_CCVKDevice_copyBuffersToTexture) static bool js_gfx_CCVKDevice_copyTexImagesToTexture(se::State& s) { - cocos2d::CCVKDevice* cobj = (cocos2d::CCVKDevice*)s.nativeThisObject(); + cc::CCVKDevice* cobj = (cc::CCVKDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_CCVKDevice_copyTexImagesToTexture : Invalid Native Object"); return js_GFXDevice_copyTexImagesToTexture(s, cobj); } @@ -234,7 +234,7 @@ SE_BIND_FUNC(js_gfx_CCVKDevice_copyTexImagesToTexture); #ifdef USE_METAL static bool js_gfx_CCMTLDevice_copyBuffersToTexture(se::State& s) { - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_CCMTLDevice_copyBuffersToTexture : Invalid Native Object"); return js_GFXDevice_copyBuffersToTexture(s, cobj); } @@ -242,7 +242,7 @@ SE_BIND_FUNC(js_gfx_CCMTLDevice_copyBuffersToTexture) static bool js_gfx_CCMTLDevice_copyTexImagesToTexture(se::State& s) { - cocos2d::CCMTLDevice* cobj = (cocos2d::CCMTLDevice*)s.nativeThisObject(); + cc::CCMTLDevice* cobj = (cc::CCMTLDevice*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_CCMTLDevice_copyTexImagesToTexture : Invalid Native Object"); return js_GFXDevice_copyTexImagesToTexture(s, cobj); } @@ -252,7 +252,7 @@ SE_BIND_FUNC(js_gfx_CCMTLDevice_copyTexImagesToTexture); #ifdef USE_GLES3 static bool js_gfx_GLES3Device_copyBuffersToTexture(se::State& s) { - cocos2d::GLES3Device* cobj = (cocos2d::GLES3Device*)s.nativeThisObject(); + cc::GLES3Device* cobj = (cc::GLES3Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GLES3Device_copyBuffersToTexture : Invalid Native Object"); return js_GFXDevice_copyBuffersToTexture(s, cobj); } @@ -260,7 +260,7 @@ SE_BIND_FUNC(js_gfx_GLES3Device_copyBuffersToTexture) static bool js_gfx_GLES3Device_copyTexImagesToTexture(se::State& s) { - cocos2d::GLES3Device* cobj = (cocos2d::GLES3Device*)s.nativeThisObject(); + cc::GLES3Device* cobj = (cc::GLES3Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GLES3Device_copyTexImagesToTexture : Invalid Native Object"); return js_GFXDevice_copyTexImagesToTexture(s, cobj); } @@ -270,7 +270,7 @@ SE_BIND_FUNC(js_gfx_GLES3Device_copyTexImagesToTexture); #ifdef USE_GLES2 static bool js_gfx_GLES2Device_copyBuffersToTexture(se::State& s) { - cocos2d::GLES2Device* cobj = (cocos2d::GLES2Device*)s.nativeThisObject(); + cc::GLES2Device* cobj = (cc::GLES2Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GLES2Device_copyBuffersToTexture : Invalid Native Object"); return js_GFXDevice_copyBuffersToTexture(s, cobj); } @@ -278,7 +278,7 @@ SE_BIND_FUNC(js_gfx_GLES2Device_copyBuffersToTexture) static bool js_gfx_GLES2Device_copyTexImagesToTexture(se::State& s) { - cocos2d::GLES2Device* cobj = (cocos2d::GLES2Device*)s.nativeThisObject(); + cc::GLES2Device* cobj = (cc::GLES2Device*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GLES2Device_copyTexImagesToTexture : Invalid Native Object"); return js_GFXDevice_copyTexImagesToTexture(s, cobj); } @@ -287,7 +287,7 @@ SE_BIND_FUNC(js_gfx_GLES2Device_copyTexImagesToTexture); static bool js_gfx_GFXBuffer_update(se::State& s) { - cocos2d::GFXBuffer* cobj = (cocos2d::GFXBuffer*)s.nativeThisObject(); + cc::GFXBuffer* cobj = (cc::GFXBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBuffer_update : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); @@ -342,7 +342,7 @@ se::Class* __jsb_cocos2d_GFXSubPass_class = nullptr; static bool js_gfx_GFXSubPass_get_bind_point(se::State& s) { - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_get_bind_point : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -356,12 +356,12 @@ SE_BIND_PROP_GET(js_gfx_GFXSubPass_get_bind_point) static bool js_gfx_GFXSubPass_set_bind_point(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_set_bind_point : Invalid Native Object"); CC_UNUSED bool ok = true; - cocos2d::GFXPipelineBindPoint arg0 = cocos2d::GFXPipelineBindPoint::GRAPHICS; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXPipelineBindPoint)tmp; } while(false); + cc::GFXPipelineBindPoint arg0 = cc::GFXPipelineBindPoint::GRAPHICS; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXPipelineBindPoint)tmp; } while(false); SE_PRECONDITION2(ok, false, "js_gfx_GFXSubPass_set_bind_point : Error processing new value"); cobj->bindPoint = arg0; return true; @@ -370,7 +370,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSubPass_set_bind_point) static bool js_gfx_GFXSubPass_get_inputs(se::State& s) { - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_get_inputs : Invalid Native Object"); se::Value jsret; @@ -387,7 +387,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSubPass_get_inputs) static bool js_gfx_GFXSubPass_set_inputs(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_set_inputs : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -399,7 +399,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSubPass_set_inputs) static bool js_gfx_GFXSubPass_get_colors(se::State& s) { - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_get_colors : Invalid Native Object"); se::Value jsret; @@ -416,7 +416,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSubPass_get_colors) static bool js_gfx_GFXSubPass_set_colors(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_set_colors : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -428,7 +428,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSubPass_set_colors) static bool js_gfx_GFXSubPass_get_resolves(se::State& s) { - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_get_resolves : Invalid Native Object"); se::Value jsret; @@ -445,7 +445,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSubPass_get_resolves) static bool js_gfx_GFXSubPass_set_resolves(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_set_resolves : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -458,7 +458,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSubPass_set_resolves) static bool js_gfx_GFXSubPass_get_depth_stencil(se::State& s) { - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_get_depth_stencil : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -472,7 +472,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSubPass_get_depth_stencil) static bool js_gfx_GFXSubPass_set_depth_stencil(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_set_depth_stencil : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -486,7 +486,7 @@ SE_BIND_PROP_SET(js_gfx_GFXSubPass_set_depth_stencil) static bool js_gfx_GFXSubPass_get_preserves(se::State& s) { - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_get_preserves : Invalid Native Object"); se::Value jsret; @@ -503,7 +503,7 @@ SE_BIND_PROP_GET(js_gfx_GFXSubPass_get_preserves) static bool js_gfx_GFXSubPass_set_preserves(se::State& s) { const auto& args = s.args(); - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXSubPass_set_preserves : Invalid Native Object"); CC_UNUSED bool ok = true; @@ -524,7 +524,7 @@ static bool js_gfx_GFXSubPass_constructor(se::State& s) if(argc == 0) { - cocos2d::GFXSubPass* cobj = new (std::nothrow) cocos2d::GFXSubPass(); + cc::GFXSubPass* cobj = new (std::nothrow) cc::GFXSubPass(); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); return true; @@ -534,17 +534,17 @@ static bool js_gfx_GFXSubPass_constructor(se::State& s) se::Object *json = args[0].toObject(); se::Value field; - cocos2d::GFXSubPass* cobj = new (std::nothrow) cocos2d::GFXSubPass(); + cc::GFXSubPass* cobj = new (std::nothrow) cc::GFXSubPass(); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); - cocos2d::GFXPipelineBindPoint arg0 = cocos2d::GFXPipelineBindPoint::GRAPHICS; + cc::GFXPipelineBindPoint arg0 = cc::GFXPipelineBindPoint::GRAPHICS; json->getProperty("bind_point", &field); if(field.isUndefined()) { SE_REPORT_ERROR("argument Field \".bind_point\" is undefined!"); return false; } - do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cocos2d::GFXPipelineBindPoint)tmp; } while(false); + do { int32_t tmp = 0; ok &= seval_to_int32(field, &tmp); arg0 = (cc::GFXPipelineBindPoint)tmp; } while(false); cobj->bindPoint = arg0; json->getProperty("inputs", &field); @@ -591,12 +591,12 @@ static bool js_gfx_GFXSubPass_constructor(se::State& s) } else if(argc == 6) { - cocos2d::GFXSubPass* cobj = new (std::nothrow) cocos2d::GFXSubPass(); + cc::GFXSubPass* cobj = new (std::nothrow) cc::GFXSubPass(); s.thisObject()->setPrivateData(cobj); se::NonRefNativePtrCreatedByCtorMap::emplace(cobj); - cocos2d::GFXPipelineBindPoint arg0 = cocos2d::GFXPipelineBindPoint::GRAPHICS; - do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cocos2d::GFXPipelineBindPoint)tmp; } while(false); + cc::GFXPipelineBindPoint arg0 = cc::GFXPipelineBindPoint::GRAPHICS; + do { int32_t tmp = 0; ok &= seval_to_int32(args[0], &tmp); arg0 = (cc::GFXPipelineBindPoint)tmp; } while(false); cobj->bindPoint = arg0; ok &= seval_to_Uint8Array(args[1], (uint8_t*)&cobj->inputs); @@ -624,12 +624,12 @@ SE_BIND_CTOR(js_gfx_GFXSubPass_constructor, __jsb_cocos2d_GFXSubPass_class, js_c static bool js_cocos2d_GFXSubPass_finalize(se::State& s) { - CCLOGINFO("jsbindings: finalizing JS object %p (cocos2d::GFXSubPass)", s.nativeThisObject()); + CCLOGINFO("jsbindings: finalizing JS object %p (cc::GFXSubPass)", s.nativeThisObject()); auto iter = se::NonRefNativePtrCreatedByCtorMap::find(s.nativeThisObject()); if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) { se::NonRefNativePtrCreatedByCtorMap::erase(iter); - cocos2d::GFXSubPass* cobj = (cocos2d::GFXSubPass*)s.nativeThisObject(); + cc::GFXSubPass* cobj = (cc::GFXSubPass*)s.nativeThisObject(); JSB_FREE(cobj); } return true; @@ -648,7 +648,7 @@ bool js_register_gfx_GFXSubPass(se::Object* obj) cls->defineProperty("preserves", _SE(js_gfx_GFXSubPass_get_preserves), _SE(js_gfx_GFXSubPass_set_preserves)); cls->defineFinalizeFunction(_SE(js_cocos2d_GFXSubPass_finalize)); cls->install(); - JSBClassType::registerClass(cls); + JSBClassType::registerClass(cls); __jsb_cocos2d_GFXSubPass_proto = cls->getProto(); __jsb_cocos2d_GFXSubPass_class = cls; @@ -659,12 +659,12 @@ bool js_register_gfx_GFXSubPass(se::Object* obj) static bool js_gfx_GFXPipelineLayout_get_layouts(se::State& s) { - cocos2d::GFXPipelineLayout* cobj = (cocos2d::GFXPipelineLayout*)s.nativeThisObject(); + cc::GFXPipelineLayout* cobj = (cc::GFXPipelineLayout*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXPipelineLayout_layouts : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); if (argc == 0) { - const std::vector& result = cobj->getLayouts(); + const std::vector& result = cobj->getLayouts(); se::Value *layouts = &s.rval(); se::HandleObject arr(se::Object::createArrayObject(result.size())); @@ -688,13 +688,13 @@ SE_BIND_PROP_GET(js_gfx_GFXPipelineLayout_get_layouts) static bool js_gfx_GFXBlendState_get_targets(se::State& s) { - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendState_get_targets : Invalid Native Object"); CC_UNUSED bool ok = true; se::Value *jsTargets = &s.rval(); - const std::vector& targets = cobj->targets; + const std::vector& targets = cobj->targets; se::HandleObject arr(se::Object::createArrayObject(targets.size())); jsTargets->setObject(arr); @@ -714,11 +714,11 @@ SE_BIND_PROP_GET(js_gfx_GFXBlendState_get_targets) static bool js_gfx_GFXBlendState_set_targets(se::State& s) { const auto& args = s.args(); - cocos2d::GFXBlendState* cobj = (cocos2d::GFXBlendState*)s.nativeThisObject(); + cc::GFXBlendState* cobj = (cc::GFXBlendState*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXBlendState_set_targets : Invalid Native Object"); CC_UNUSED bool ok = true; - std::vector arg0; + std::vector arg0; ok &= seval_to_std_vector(args[0], &arg0); SE_PRECONDITION2(ok, false, "js_gfx_GFXBlendState_set_targets : Error processing new value"); cobj->targets = arg0; @@ -728,13 +728,13 @@ SE_BIND_PROP_SET(js_gfx_GFXBlendState_set_targets) static bool js_gfx_GFXCommandBuffer_execute(se::State& s) { - cocos2d::GFXCommandBuffer* cobj = (cocos2d::GFXCommandBuffer*)s.nativeThisObject(); + cc::GFXCommandBuffer* cobj = (cc::GFXCommandBuffer*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXCommandBuffer_execute : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 2) { - std::vector cmdBufs; + std::vector cmdBufs; unsigned int count = 0; ok &= seval_to_uint32(args[1], (uint32_t*)&count); @@ -760,7 +760,7 @@ static bool js_gfx_GFXCommandBuffer_execute(se::State& s) break; } - cocos2d::GFXCommandBuffer *cmdBuf = (cocos2d::GFXCommandBuffer*)tmp.toObject()->getPrivateData(); + cc::GFXCommandBuffer *cmdBuf = (cc::GFXCommandBuffer*)tmp.toObject()->getPrivateData(); cmdBufs[i] = cmdBuf; } } @@ -776,12 +776,12 @@ SE_BIND_FUNC(js_gfx_GFXCommandBuffer_execute) static bool js_gfx_GFXInputAssembler_extractDrawInfo(se::State& s) { - cocos2d::GFXInputAssembler* cobj = (cocos2d::GFXInputAssembler*)s.nativeThisObject(); + cc::GFXInputAssembler* cobj = (cc::GFXInputAssembler*)s.nativeThisObject(); SE_PRECONDITION2(cobj, false, "js_gfx_GFXInputAssembler_extractDrawInfo : Invalid Native Object"); const auto& args = s.args(); size_t argc = args.size(); if (argc == 1) { - cocos2d::GFXDrawInfo nativeDrawInfo; + cc::GFXDrawInfo nativeDrawInfo; cobj->extractDrawInfo(nativeDrawInfo); se::Object* drawInfo = args[0].toObject(); @@ -815,40 +815,40 @@ SE_BIND_FUNC(js_gfx_GFXInputAssembler_extractDrawInfo) bool register_all_gfx_manual(se::Object* obj) { - __jsb_cocos2d_GFXBuffer_proto->defineFunction("update", _SE(js_gfx_GFXBuffer_update)); + __jsb_cc_GFXBuffer_proto->defineFunction("update", _SE(js_gfx_GFXBuffer_update)); - __jsb_cocos2d_GFXPipelineLayout_proto->defineProperty("layouts", _SE(js_gfx_GFXPipelineLayout_get_layouts), nullptr); + __jsb_cc_GFXPipelineLayout_proto->defineProperty("layouts", _SE(js_gfx_GFXPipelineLayout_get_layouts), nullptr); - __jsb_cocos2d_GFXBlendState_proto->defineProperty("targets", _SE(js_gfx_GFXBlendState_get_targets), _SE(js_gfx_GFXBlendState_set_targets)); + __jsb_cc_GFXBlendState_proto->defineProperty("targets", _SE(js_gfx_GFXBlendState_get_targets), _SE(js_gfx_GFXBlendState_set_targets)); - __jsb_cocos2d_GFXCommandBuffer_proto->defineFunction("execute", _SE(js_gfx_GFXCommandBuffer_execute)); + __jsb_cc_GFXCommandBuffer_proto->defineFunction("execute", _SE(js_gfx_GFXCommandBuffer_execute)); - __jsb_cocos2d_GFXInputAssembler_proto->defineFunction("extractDrawInfo", _SE(js_gfx_GFXInputAssembler_extractDrawInfo)); + __jsb_cc_GFXInputAssembler_proto->defineFunction("extractDrawInfo", _SE(js_gfx_GFXInputAssembler_extractDrawInfo)); js_register_gfx_GFXSubPass(obj); #if defined USE_VULKAN register_all_vk(obj); - __jsb_cocos2d_CCVKDevice_proto->defineFunction("copyBuffersToTexture", _SE(js_gfx_CCVKDevice_copyBuffersToTexture)); - __jsb_cocos2d_CCVKDevice_proto->defineFunction("copyTexImagesToTexture", _SE(js_gfx_CCVKDevice_copyTexImagesToTexture)); + __jsb_cc_CCVKDevice_proto->defineFunction("copyBuffersToTexture", _SE(js_gfx_CCVKDevice_copyBuffersToTexture)); + __jsb_cc_CCVKDevice_proto->defineFunction("copyTexImagesToTexture", _SE(js_gfx_CCVKDevice_copyTexImagesToTexture)); #endif #if defined USE_GLES3 register_all_gles3(obj); - __jsb_cocos2d_GLES3Device_proto->defineFunction("copyBuffersToTexture", _SE(js_gfx_GLES3Device_copyBuffersToTexture)); - __jsb_cocos2d_GLES3Device_proto->defineFunction("copyTexImagesToTexture", _SE(js_gfx_GLES3Device_copyTexImagesToTexture)); + __jsb_cc_GLES3Device_proto->defineFunction("copyBuffersToTexture", _SE(js_gfx_GLES3Device_copyBuffersToTexture)); + __jsb_cc_GLES3Device_proto->defineFunction("copyTexImagesToTexture", _SE(js_gfx_GLES3Device_copyTexImagesToTexture)); #endif #ifdef USE_GLES2 register_all_gles2(obj); - __jsb_cocos2d_GLES2Device_proto->defineFunction("copyBuffersToTexture", _SE(js_gfx_GLES2Device_copyBuffersToTexture)); - __jsb_cocos2d_GLES2Device_proto->defineFunction("copyTexImagesToTexture", _SE(js_gfx_GLES2Device_copyTexImagesToTexture)); + __jsb_cc_GLES2Device_proto->defineFunction("copyBuffersToTexture", _SE(js_gfx_GLES2Device_copyBuffersToTexture)); + __jsb_cc_GLES2Device_proto->defineFunction("copyTexImagesToTexture", _SE(js_gfx_GLES2Device_copyTexImagesToTexture)); #endif #if defined USE_METAL register_all_mtl(obj); - __jsb_cocos2d_CCMTLDevice_proto->defineFunction("copyBuffersToTexture", _SE(js_gfx_CCMTLDevice_copyBuffersToTexture)); - __jsb_cocos2d_CCMTLDevice_proto->defineFunction("copyTexImagesToTexture", _SE(js_gfx_CCMTLDevice_copyTexImagesToTexture)); + __jsb_cc_CCMTLDevice_proto->defineFunction("copyBuffersToTexture", _SE(js_gfx_CCMTLDevice_copyBuffersToTexture)); + __jsb_cc_CCMTLDevice_proto->defineFunction("copyTexImagesToTexture", _SE(js_gfx_CCMTLDevice_copyTexImagesToTexture)); #endif - __jsb_cocos2d_GFXDevice_proto->defineFunction("createTexture", _SE(js_gfx_GFXDevice_createTexture)); - __jsb_cocos2d_GFXTexture_proto->defineFunction("initialize", _SE(js_gfx_GFXTexture_initialize)); + __jsb_cc_GFXDevice_proto->defineFunction("createTexture", _SE(js_gfx_GFXDevice_createTexture)); + __jsb_cc_GFXTexture_proto->defineFunction("initialize", _SE(js_gfx_GFXTexture_initialize)); return true; } diff --git a/native/cocos/scripting/js-bindings/manual/jsb_global.cpp b/native/cocos/scripting/js-bindings/manual/jsb_global.cpp index 948bcbedfc..838d154acd 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_global.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_global.cpp @@ -42,14 +42,14 @@ #include #include -using namespace cocos2d; +using namespace cc; se::Object* __jsbObj = nullptr; se::Object* __glObj = nullptr; static ThreadPool* __threadPool = nullptr; -static std::shared_ptr _localDownloader = nullptr; +static std::shared_ptr _localDownloader = nullptr; static std::map> _localDownloaderHandlers; static uint64_t _localDownloaderTaskId = 1000000; static std::string xxteaKey = ""; @@ -58,12 +58,12 @@ void jsb_set_xxtea_key(const std::string& key) xxteaKey = key; } -static cocos2d::network::Downloader *localDownloader() +static cc::network::Downloader *localDownloader() { if(!_localDownloader) { - _localDownloader = std::make_shared(); - _localDownloader->onDataTaskSuccess = [=](const cocos2d::network::DownloadTask& task, + _localDownloader = std::make_shared(); + _localDownloader->onDataTaskSuccess = [=](const cc::network::DownloadTask& task, std::vector& data) { if(data.empty()) { @@ -85,7 +85,7 @@ static cocos2d::network::Downloader *localDownloader() //initImageFunc("", imageData, imageBytes); _localDownloaderHandlers.erase(callback); }; - _localDownloader->onTaskError = [=](const cocos2d::network::DownloadTask& task, + _localDownloader->onTaskError = [=](const cc::network::DownloadTask& task, int errorCode, int errorCodeInternal, const std::string& errorStr) { @@ -445,7 +445,7 @@ SE_BIND_FUNC(jsc_garbageCollect) static bool jsc_dumpNativePtrToSeObjectMap(se::State& s) { - cocos2d::log(">>> total: %d, Dump (native -> jsobj) map begin", (int)se::NativePtrToObjectMap::size()); + cc::log(">>> total: %d, Dump (native -> jsobj) map begin", (int)se::NativePtrToObjectMap::size()); struct NamePtrStruct { @@ -480,9 +480,9 @@ static bool jsc_dumpNativePtrToSeObjectMap(se::State& s) for (const auto& e : namePtrArray) { - cocos2d::log("%s: %p", e.name, e.ptr); + cc::log("%s: %p", e.name, e.ptr); } - cocos2d::log(">>> total: %d, nonRefMap: %d, Dump (native -> jsobj) map end", (int)se::NativePtrToObjectMap::size(), (int)se::NonRefNativePtrCreatedByCtorMap::size()); + cc::log(">>> total: %d, nonRefMap: %d, Dump (native -> jsobj) map end", (int)se::NativePtrToObjectMap::size(), (int)se::NonRefNativePtrCreatedByCtorMap::size()); return true; } SE_BIND_FUNC(jsc_dumpNativePtrToSeObjectMap) @@ -722,7 +722,7 @@ namespace uint32_t width = 0; uint32_t height = 0; uint8_t* data = nullptr; - cocos2d::GFXFormat format = cocos2d::GFXFormat::UNKNOWN; + cc::GFXFormat format = cc::GFXFormat::UNKNOWN; uint8_t bpp = 0; uint8_t numberOfMipmaps = 0; bool hasAlpha = false; @@ -783,22 +783,22 @@ namespace // will create a big texture, and update its content with small pictures. // The big texture is RGBA888, then the small picture should be the same // format, or it will cause 0x502 error on OpenGL ES 2. - if (!imgInfo->compressed && imgInfo->format != cocos2d::GFXFormat::RGBA8) { + if (!imgInfo->compressed && imgInfo->format != cc::GFXFormat::RGBA8) { imgInfo->length = img->getWidth() * img->getHeight() * 4; uint8_t* dst = nullptr; uint32_t length = imgInfo->length; uint8_t* src = imgInfo->data; switch(imgInfo->format) { - case cocos2d::GFXFormat::A8: - case cocos2d::GFXFormat::LA8: + case cc::GFXFormat::A8: + case cc::GFXFormat::LA8: dst = convertIA2RGBA(length, src); break; - case cocos2d::GFXFormat::L8: - case cocos2d::GFXFormat::R8: - case cocos2d::GFXFormat::R8I: + case cc::GFXFormat::L8: + case cc::GFXFormat::R8: + case cc::GFXFormat::R8I: dst = convertI2RGBA(length, src); break; - case cocos2d::GFXFormat::RGB8: + case cc::GFXFormat::RGB8: dst = convertRGB2RGBA(length, src); break; default: @@ -962,7 +962,7 @@ static bool js_saveImageData(se::State& s) size_t argc = args.size(); CC_UNUSED bool ok = true; if (argc == 4) { - cocos2d::Data data; + cc::Data data; ok &= seval_to_Data(args[0], &data); uint32_t width, height; @@ -1067,7 +1067,7 @@ static bool JSB_setPreferredFramesPerSecond(se::State& s) int32_t fps; ok = seval_to_int32(args[0], &fps); SE_PRECONDITION2(ok, false, "fps is invalid!"); - // cocos2d::log("EMPTY IMPLEMENTATION OF jsb.setPreferredFramesPerSecond"); + // cc::log("EMPTY IMPLEMENTATION OF jsb.setPreferredFramesPerSecond"); Application::getInstance()->setPreferredFramesPerSecond(fps); return true; } @@ -1088,7 +1088,7 @@ static bool JSB_showInputBox(se::State& s) se::Value tmp; const auto& obj = args[0].toObject(); - cocos2d::EditBox::ShowInfo showInfo; + cc::EditBox::ShowInfo showInfo; ok = obj->getProperty("defaultValue", &tmp); SE_PRECONDITION2(ok && tmp.isString(), false, "defaultValue is invalid!"); diff --git a/native/cocos/scripting/js-bindings/manual/jsb_global.h b/native/cocos/scripting/js-bindings/manual/jsb_global.h index 2a617bc63f..5645024459 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_global.h +++ b/native/cocos/scripting/js-bindings/manual/jsb_global.h @@ -31,7 +31,7 @@ #include template -typename std::enable_if::value, T>::type* +typename std::enable_if::value, T>::type* jsb_override_new(Args &&... args) { //create object in gfx way @@ -39,7 +39,7 @@ jsb_override_new(Args &&... args) } template -typename std::enable_if::value, void>::type +typename std::enable_if::value, void>::type jsb_override_delete(T* arg) { //create object in gfx way @@ -47,7 +47,7 @@ jsb_override_delete(T* arg) } template -typename std::enable_if::value, T>::type* +typename std::enable_if::value, T>::type* jsb_override_new(Args &&... args) { //create object in the default way @@ -55,7 +55,7 @@ jsb_override_new(Args &&... args) } template -typename std::enable_if::value, void>::type +typename std::enable_if::value, void>::type jsb_override_delete(T* arg) { //create object in gfx way diff --git a/native/cocos/scripting/js-bindings/manual/jsb_helper.hpp b/native/cocos/scripting/js-bindings/manual/jsb_helper.hpp index 4afa985ca0..553b4d1bfb 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_helper.hpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_helper.hpp @@ -29,7 +29,7 @@ #include -class CleanupTask : public cocos2d::Ref +class CleanupTask : public cc::Ref { public: static void pushTaskToAutoReleasePool(const std::function& cb); diff --git a/native/cocos/scripting/js-bindings/manual/jsb_module_register.cpp b/native/cocos/scripting/js-bindings/manual/jsb_module_register.cpp index b87c26f444..7f11bbcc36 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_module_register.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_module_register.cpp @@ -69,7 +69,7 @@ #endif // (CC_PLATFORM == CC_PLATFORM_MAC_IOS || CC_PLATFORM == CC_PLATFORM_ANDROID) -using namespace cocos2d; +using namespace cc; bool jsb_register_all_modules() { diff --git a/native/cocos/scripting/js-bindings/manual/jsb_platform_android.cpp b/native/cocos/scripting/js-bindings/manual/jsb_platform_android.cpp index a1c3fe83fa..24cf674dbb 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_platform_android.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_platform_android.cpp @@ -37,7 +37,7 @@ #endif -using namespace cocos2d; +using namespace cc; static std::unordered_map _fontFamilyNameMap; diff --git a/native/cocos/scripting/js-bindings/manual/jsb_platfrom_apple.mm b/native/cocos/scripting/js-bindings/manual/jsb_platfrom_apple.mm index a481d47f15..2e126420c9 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_platfrom_apple.mm +++ b/native/cocos/scripting/js-bindings/manual/jsb_platfrom_apple.mm @@ -34,7 +34,7 @@ #import #include -using namespace cocos2d; +using namespace cc; static std::unordered_map _fontFamilyNameMap; diff --git a/native/cocos/scripting/js-bindings/manual/jsb_platfrom_win32.cpp b/native/cocos/scripting/js-bindings/manual/jsb_platfrom_win32.cpp index 0832fce51b..49876d8efa 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_platfrom_win32.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_platfrom_win32.cpp @@ -32,7 +32,7 @@ #include -using namespace cocos2d; +using namespace cc; static std::unordered_map _fontFamilyNameMap; diff --git a/native/cocos/scripting/js-bindings/manual/jsb_socketio.cpp b/native/cocos/scripting/js-bindings/manual/jsb_socketio.cpp index d62bbc12d6..2c68411a25 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_socketio.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_socketio.cpp @@ -33,8 +33,8 @@ #include "base/ccUTF8.h" #include "platform/CCApplication.h" -using namespace cocos2d; -using namespace cocos2d::network; +using namespace cc; +using namespace cc::network; se::Class* __jsb_SocketIO_class = nullptr; @@ -101,7 +101,7 @@ public: se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; - if (cocos2d::Application::getInstance() == nullptr) + if (cc::Application::getInstance() == nullptr) return; auto iter = se::NativePtrToObjectMap::find(client); //IDEA: client probably be a new value with the same address as the old one, it may cause undefined result. @@ -136,7 +136,7 @@ public: if (eventName == "disconnect") { - cocos2d::log("disconnect ... "); //IDEA: + cc::log("disconnect ... "); //IDEA: } } diff --git a/native/cocos/scripting/js-bindings/manual/jsb_websocket.cpp b/native/cocos/scripting/js-bindings/manual/jsb_websocket.cpp index f88e43d185..32d2c55258 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_websocket.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_websocket.cpp @@ -32,8 +32,8 @@ #include "base/ccUTF8.h" #include "platform/CCApplication.h" -using namespace cocos2d; -using namespace cocos2d::network; +using namespace cc; +using namespace cc::network; /* [Constructor(in DOMString url, in optional DOMString protocols)] @@ -77,7 +77,7 @@ void JSB_WebSocketDelegate::onOpen(WebSocket* ws) se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; - if (cocos2d::Application::getInstance() == nullptr) + if (cc::Application::getInstance() == nullptr) return; auto iter = se::NativePtrToObjectMap::find(ws); @@ -112,7 +112,7 @@ void JSB_WebSocketDelegate::onMessage(WebSocket* ws, const WebSocket::Data& data se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; - if (cocos2d::Application::getInstance() == nullptr) + if (cc::Application::getInstance() == nullptr) return; auto iter = se::NativePtrToObjectMap::find(ws); @@ -174,7 +174,7 @@ void JSB_WebSocketDelegate::onClose(WebSocket* ws) se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; - if (cocos2d::Application::getInstance() == nullptr) + if (cc::Application::getInstance() == nullptr) return; auto iter = se::NativePtrToObjectMap::find(ws); @@ -224,7 +224,7 @@ void JSB_WebSocketDelegate::onError(WebSocket* ws, const WebSocket::ErrorCode& e se::ScriptEngine::getInstance()->clearException(); se::AutoHandleScope hs; - if (cocos2d::Application::getInstance() == nullptr) + if (cc::Application::getInstance() == nullptr) return; auto iter = se::NativePtrToObjectMap::find(ws); diff --git a/native/cocos/scripting/js-bindings/manual/jsb_websocket.hpp b/native/cocos/scripting/js-bindings/manual/jsb_websocket.hpp index f01b6876d2..352c10e866 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_websocket.hpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_websocket.hpp @@ -33,19 +33,19 @@ namespace se { class Value; } -class JSB_WebSocketDelegate : public cocos2d::Ref, public cocos2d::network::WebSocket::Delegate { +class JSB_WebSocketDelegate : public cc::Ref, public cc::network::WebSocket::Delegate { public: JSB_WebSocketDelegate(); - virtual void onOpen(cocos2d::network::WebSocket *ws) override; + virtual void onOpen(cc::network::WebSocket *ws) override; - virtual void onMessage(cocos2d::network::WebSocket *ws, - const cocos2d::network::WebSocket::Data &data) override; + virtual void onMessage(cc::network::WebSocket *ws, + const cc::network::WebSocket::Data &data) override; - virtual void onClose(cocos2d::network::WebSocket *ws) override; + virtual void onClose(cc::network::WebSocket *ws) override; - virtual void onError(cocos2d::network::WebSocket *ws, - const cocos2d::network::WebSocket::ErrorCode &error) override; + virtual void onError(cc::network::WebSocket *ws, + const cc::network::WebSocket::ErrorCode &error) override; void setJSDelegate(const se::Value &jsDelegate); diff --git a/native/cocos/scripting/js-bindings/manual/jsb_xmlhttprequest.cpp b/native/cocos/scripting/js-bindings/manual/jsb_xmlhttprequest.cpp index 46584521b2..3402960ab3 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_xmlhttprequest.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_xmlhttprequest.cpp @@ -44,8 +44,8 @@ #include "cocos/base/CCData.h" #include "platform/CCApplication.h" -using namespace cocos2d; -using namespace cocos2d::network; +using namespace cc; +using namespace cc::network; namespace { @@ -152,7 +152,7 @@ public: bool open(const std::string& method, const std::string& url); void send(); void sendString(const std::string& str); - void sendBinary(const cocos2d::Data& data); + void sendBinary(const cc::Data& data); void setRequestHeader(const std::string& key, const std::string& value); std::string getAllResponseHeaders() const; @@ -162,7 +162,7 @@ public: uint16_t getStatus() const { return _status; } const std::string& getStatusText() const { return _statusText; } const std::string& getResponseText() const { return _responseText; } - const cocos2d::Data& getResponseData() const { return _responseData; } + const cc::Data& getResponseData() const { return _responseData; } ResponseType getResponseType() const { return _responseType; } void setResponseType(ResponseType type) { _responseType = type; } @@ -181,7 +181,7 @@ private: void setReadyState(ReadyState readyState); void getHeader(const std::string& header); - void onResponse(cocos2d::network::HttpClient* client, cocos2d::network::HttpResponse* response); + void onResponse(cc::network::HttpClient* client, cc::network::HttpResponse* response); void setHttpRequestData(const char* data, size_t len); void sendRequest(); @@ -197,10 +197,10 @@ private: std::string _statusText; std::string _overrideMimeType; - cocos2d::Data _responseData; + cc::Data _responseData; - cocos2d::network::HttpRequest* _httpRequest; -// cocos2d::EventListenerCustom* _resetDirectorListener; + cc::network::HttpRequest* _httpRequest; +// cc::EventListenerCustom* _resetDirectorListener; unsigned long _timeoutInMilliseconds; uint16_t _status; @@ -537,7 +537,7 @@ void XMLHttpRequest::sendRequest() setHttpRequestHeader(); _httpRequest->setResponseCallback(CC_CALLBACK_2(XMLHttpRequest::onResponse, this)); - cocos2d::network::HttpClient::getInstance()->sendImmediate(_httpRequest); + cc::network::HttpClient::getInstance()->sendImmediate(_httpRequest); if (onloadstart != nullptr) { diff --git a/native/cocos/storage/local-storage/LocalStorage-android.cpp b/native/cocos/storage/local-storage/LocalStorage-android.cpp index df2f441872..7aa4be62a3 100644 --- a/native/cocos/storage/local-storage/LocalStorage-android.cpp +++ b/native/cocos/storage/local-storage/LocalStorage-android.cpp @@ -45,7 +45,7 @@ #define JCLS_LOCALSTORAGE "org/cocos2dx/lib/Cocos2dxLocalStorage" #endif -USING_NS_CC; +using namespace cc; static int _initialized = 0; static void splitFilename (std::string& str) diff --git a/native/cocos/ui/edit-box/EditBox-android.cpp b/native/cocos/ui/edit-box/EditBox-android.cpp index f1f4b33c22..72fae85617 100644 --- a/native/cocos/ui/edit-box/EditBox-android.cpp +++ b/native/cocos/ui/edit-box/EditBox-android.cpp @@ -71,11 +71,11 @@ namespace } } -NS_CC_BEGIN +namespace cc { bool EditBox::_isShown = false; -void EditBox::show(const cocos2d::EditBox::ShowInfo& showInfo) +void EditBox::show(const cc::EditBox::ShowInfo& showInfo) { JniHelper::callStaticVoidMethod(JCLS_EDITBOX, "showNative", @@ -104,14 +104,14 @@ bool EditBox::complete() return true; } -NS_CC_END +} extern "C" { JNIEXPORT void JNICALL JNI_EDITBOX(onKeyboardInputNative)(JNIEnv* env, jclass, jstring text) { - auto textStr = cocos2d::JniHelper::jstring2string(text); - cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread([textStr]() { + auto textStr = cc::JniHelper::jstring2string(text); + cc::Application::getInstance()->getScheduler()->performFunctionInCocosThread([textStr]() { callJSFunc("input", textStr); }); @@ -119,16 +119,16 @@ extern "C" JNIEXPORT void JNICALL JNI_EDITBOX(onKeyboardCompleteNative)(JNIEnv* env, jclass, jstring text) { - auto textStr = cocos2d::JniHelper::jstring2string(text); - cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread([textStr]() { + auto textStr = cc::JniHelper::jstring2string(text); + cc::Application::getInstance()->getScheduler()->performFunctionInCocosThread([textStr]() { callJSFunc("complete", textStr); }); } JNIEXPORT void JNICALL JNI_EDITBOX(onKeyboardConfirmNative)(JNIEnv* env, jclass, jstring text) { - auto textStr = cocos2d::JniHelper::jstring2string(text); - cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread([textStr]() { + auto textStr = cc::JniHelper::jstring2string(text); + cc::Application::getInstance()->getScheduler()->performFunctionInCocosThread([textStr]() { callJSFunc("confirm", textStr); }); } diff --git a/native/cocos/ui/edit-box/EditBox-ios.mm b/native/cocos/ui/edit-box/EditBox-ios.mm index e79f5f17d8..80b9d26860 100644 --- a/native/cocos/ui/edit-box/EditBox-ios.mm +++ b/native/cocos/ui/edit-box/EditBox-ios.mm @@ -208,7 +208,7 @@ namespace return NSLocalizedString(titleKey, nil); // get i18n string to be the title } - void initTextField(const CGRect& rect, const cocos2d::EditBox::ShowInfo& showInfo) + void initTextField(const CGRect& rect, const cc::EditBox::ShowInfo& showInfo) { if (! g_textField) { @@ -235,7 +235,7 @@ namespace [g_textFieldConfirmButton setTitle:getConfirmButtonTitle(showInfo.confirmType) forState:UIControlStateNormal]; } - void initTextView(const CGRect& viewRect, const CGRect& btnRect, const cocos2d::EditBox::ShowInfo& showInfo) + void initTextView(const CGRect& viewRect, const CGRect& btnRect, const cc::EditBox::ShowInfo& showInfo) { if (!g_textView) { @@ -271,7 +271,7 @@ namespace return viewRect; } - void addTextInput(const cocos2d::EditBox::ShowInfo& showInfo) + void addTextInput(const cc::EditBox::ShowInfo& showInfo) { auto safeAreaRect = getSafeAreaRect(); int height = getTextInputHeight(); @@ -343,7 +343,7 @@ namespace -(void)keyboardWillHide: (NSNotification*) notification { - cocos2d::EditBox::hide(); + cc::EditBox::hide(); } @end @@ -371,7 +371,7 @@ namespace -(BOOL) textFieldShouldReturn:(UITextField *)textField { - cocos2d::EditBox::complete(); + cc::EditBox::complete(); return YES; } @end @@ -382,7 +382,7 @@ namespace const std::string text([getCurrentText() UTF8String]); callJSFunc("confirm", text); if (!g_confirmHold) - cocos2d::EditBox::complete(); + cc::EditBox::complete(); } @end @@ -414,11 +414,11 @@ namespace // MARK: EditBox -NS_CC_BEGIN +namespace cc { bool EditBox::_isShown = false; -void EditBox::show(const cocos2d::EditBox::ShowInfo& showInfo) +void EditBox::show(const cc::EditBox::ShowInfo& showInfo) { // Should initialize them at first. g_maxLength = showInfo.maxLength; @@ -457,4 +457,4 @@ bool EditBox::complete() return true; } -NS_CC_END +} diff --git a/native/cocos/ui/edit-box/EditBox-mac.mm b/native/cocos/ui/edit-box/EditBox-mac.mm index 03e910bbb2..f09a833acb 100644 --- a/native/cocos/ui/edit-box/EditBox-mac.mm +++ b/native/cocos/ui/edit-box/EditBox-mac.mm @@ -181,7 +181,7 @@ namespace g_textInputCallback.toObject()->call(args, nullptr); } - void initTextView(const cocos2d::EditBox::ShowInfo& showInfo) + void initTextView(const cc::EditBox::ShowInfo& showInfo) { CGRect rect = CGRectMake(showInfo.x, showInfo.y, showInfo.width, showInfo.height); if (! g_textView) @@ -208,7 +208,7 @@ namespace [nsWindow makeFirstResponder:g_scrollView]; } - void doInitTextField(NSTextField* textField, const CGRect& rect, const cocos2d::EditBox::ShowInfo& showInfo) + void doInitTextField(NSTextField* textField, const CGRect& rect, const cc::EditBox::ShowInfo& showInfo) { textField.editable = TRUE; textField.wantsLayer = TRUE; @@ -221,7 +221,7 @@ namespace [textField becomeFirstResponder]; } - void initTextField(const cocos2d::EditBox::ShowInfo& showInfo) + void initTextField(const cc::EditBox::ShowInfo& showInfo) { CGRect rect = CGRectMake(showInfo.x, showInfo.y, showInfo.width, showInfo.height); @@ -252,7 +252,7 @@ namespace } } - void init(const cocos2d::EditBox::ShowInfo& showInfo) + void init(const cc::EditBox::ShowInfo& showInfo) { if (showInfo.isMultiline) initTextView(showInfo); @@ -265,7 +265,7 @@ namespace Implementation of EditBox. ************************************************************************/ -NS_CC_BEGIN +namespace cc { bool EditBox::_isShown = false; @@ -321,4 +321,4 @@ bool EditBox::complete() return true; } -NS_CC_END +} diff --git a/native/cocos/ui/edit-box/EditBox-win32.cpp b/native/cocos/ui/edit-box/EditBox-win32.cpp index 78ae297f1d..e3f1b187fb 100644 --- a/native/cocos/ui/edit-box/EditBox-win32.cpp +++ b/native/cocos/ui/edit-box/EditBox-win32.cpp @@ -32,9 +32,9 @@ #include #include -extern std::shared_ptr cc_get_application_view(); +extern std::shared_ptr cc_get_application_view(); -NS_CC_BEGIN +namespace cc { /************************************************************************* Global variables and functions. @@ -203,4 +203,4 @@ bool EditBox::complete() return true; } -NS_CC_END +} diff --git a/native/cocos/ui/edit-box/EditBox.h b/native/cocos/ui/edit-box/EditBox.h index f9af007e14..89321b8ec5 100644 --- a/native/cocos/ui/edit-box/EditBox.h +++ b/native/cocos/ui/edit-box/EditBox.h @@ -26,7 +26,7 @@ #include #include "base/ccMacros.h" -NS_CC_BEGIN +namespace cc { class EditBox { @@ -56,4 +56,4 @@ private: static bool _isShown; }; -NS_CC_END +} diff --git a/native/cocos/ui/videoplayer/VideoPlayer-android.cpp b/native/cocos/ui/videoplayer/VideoPlayer-android.cpp index b0f12599c3..5696abdac1 100644 --- a/native/cocos/ui/videoplayer/VideoPlayer-android.cpp +++ b/native/cocos/ui/videoplayer/VideoPlayer-android.cpp @@ -38,7 +38,7 @@ static const std::string videoHelperClassName = "org/cocos2dx/lib/Cocos2dxVideoHelper"; -USING_NS_CC; +using namespace cc; static void executeVideoCallback(int index,int event); @@ -49,7 +49,7 @@ extern "C" { auto func = []() -> void { executeVideoCallback(index,event); }; - cocos2d::Application::getInstance()->getScheduler()->performFunctionInCocosThread(func); + cc::Application::getInstance()->getScheduler()->performFunctionInCocosThread(func); } } diff --git a/native/cocos/ui/videoplayer/VideoPlayer-ios.mm b/native/cocos/ui/videoplayer/VideoPlayer-ios.mm index 47cd28a565..3f1a557582 100644 --- a/native/cocos/ui/videoplayer/VideoPlayer-ios.mm +++ b/native/cocos/ui/videoplayer/VideoPlayer-ios.mm @@ -24,7 +24,7 @@ #include "VideoPlayer.h" -USING_NS_CC; +using namespace cc; // No Available on tvOS #if CC_PLATFORM == CC_PLATFORM_MAC_IOS && !defined(CC_TARGET_OS_TVOS) @@ -293,7 +293,7 @@ typedef NS_ENUM(NSInteger, PlayerbackState) { } -(void)addPlayerControllerSubView { - auto eaglview = (CCEAGLView*)cocos2d::Application::getInstance()->getView(); + auto eaglview = (CCEAGLView*)cc::Application::getInstance()->getView(); [eaglview addSubview:self.playerController.view]; } @@ -444,7 +444,7 @@ void VideoPlayer::onPlayEvent(int event) void VideoPlayer::setFrame(float x, float y, float width, float height) { - auto eaglview = (CCEAGLView*)cocos2d::Application::getInstance()->getView(); + auto eaglview = (CCEAGLView*)cc::Application::getInstance()->getView(); auto scaleFactor = [eaglview contentScaleFactor]; [((UIVideoViewWrapperIos*)_videoView) setFrame:x/scaleFactor :y/scaleFactor diff --git a/native/cocos/ui/videoplayer/VideoPlayer.h b/native/cocos/ui/videoplayer/VideoPlayer.h index 3371c67eaa..3d54658b87 100644 --- a/native/cocos/ui/videoplayer/VideoPlayer.h +++ b/native/cocos/ui/videoplayer/VideoPlayer.h @@ -38,7 +38,7 @@ #endif #endif // OBJC_CLASS -NS_CC_BEGIN +namespace cc { /** * @class VideoPlayer @@ -177,4 +177,4 @@ class VideoPlayer : public Ref void *_videoView; }; -NS_CC_END +} diff --git a/native/extensions/ExtensionMacros.h b/native/extensions/ExtensionMacros.h index 5f83e8fbf2..dae6ac7de0 100644 --- a/native/extensions/ExtensionMacros.h +++ b/native/extensions/ExtensionMacros.h @@ -27,9 +27,9 @@ #ifndef __EXTENSIONMARCROS_H__ #define __EXTENSIONMARCROS_H__ -#define NS_CC_EXT_BEGIN namespace cocos2d { namespace extension { +#define NS_CC_EXT_BEGIN namespace cc { namespace extension { #define NS_CC_EXT_END }} -#define USING_NS_CC_EXT using namespace cocos2d::extension +#define USING_NS_CC_EXT using namespace cc::extension #endif /* __EXTENSIONMARCROS_H__ */ diff --git a/native/extensions/assets-manager/CCAsyncTaskPool.cpp b/native/extensions/assets-manager/CCAsyncTaskPool.cpp index f0512df3ea..456289fe31 100644 --- a/native/extensions/assets-manager/CCAsyncTaskPool.cpp +++ b/native/extensions/assets-manager/CCAsyncTaskPool.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "CCAsyncTaskPool.h" -NS_CC_BEGIN +namespace cc { AsyncTaskPool* AsyncTaskPool::s_asyncTaskPool = nullptr; @@ -53,4 +53,4 @@ AsyncTaskPool::~AsyncTaskPool() { } -NS_CC_END +} diff --git a/native/extensions/assets-manager/CCAsyncTaskPool.h b/native/extensions/assets-manager/CCAsyncTaskPool.h index 117e9ff2dd..3ba275b39b 100644 --- a/native/extensions/assets-manager/CCAsyncTaskPool.h +++ b/native/extensions/assets-manager/CCAsyncTaskPool.h @@ -42,7 +42,8 @@ THE SOFTWARE. * @addtogroup base * @{ */ -NS_CC_BEGIN +namespace cc { + /** @@ -213,7 +214,7 @@ inline void AsyncTaskPool::enqueue(AsyncTaskPool::TaskType type, const TaskCallB } -NS_CC_END +} // end group /// @} #endif //__CCSYNC_TASK_POOL_H_ diff --git a/native/extensions/assets-manager/CCEventAssetsManagerEx.cpp b/native/extensions/assets-manager/CCEventAssetsManagerEx.cpp index 541bded18a..5649133879 100644 --- a/native/extensions/assets-manager/CCEventAssetsManagerEx.cpp +++ b/native/extensions/assets-manager/CCEventAssetsManagerEx.cpp @@ -30,7 +30,7 @@ NS_CC_EXT_BEGIN -EventAssetsManagerEx::EventAssetsManagerEx(const std::string& eventName, cocos2d::extension::AssetsManagerEx *manager, const EventCode &code, const std::string& assetId/* = "" */, const std::string& message/* = "" */, int curle_code/* = CURLE_OK*/, int curlm_code/* = CURLM_OK*/) +EventAssetsManagerEx::EventAssetsManagerEx(const std::string& eventName, cc::extension::AssetsManagerEx *manager, const EventCode &code, const std::string& assetId/* = "" */, const std::string& message/* = "" */, int curle_code/* = CURLE_OK*/, int curlm_code/* = CURLM_OK*/) : _code(code) , _manager(manager) , _message(message) diff --git a/native/extensions/assets-manager/CCEventAssetsManagerEx.h b/native/extensions/assets-manager/CCEventAssetsManagerEx.h index 42021cc89b..bd0b116b8b 100644 --- a/native/extensions/assets-manager/CCEventAssetsManagerEx.h +++ b/native/extensions/assets-manager/CCEventAssetsManagerEx.h @@ -35,7 +35,7 @@ NS_CC_EXT_BEGIN class AssetsManagerEx; -class CC_EX_DLL EventAssetsManagerEx : public cocos2d::Ref +class CC_EX_DLL EventAssetsManagerEx : public cc::Ref { public: //! Update events code @@ -64,7 +64,7 @@ public: inline std::string getAssetId() const { return _assetId; }; - inline cocos2d::extension::AssetsManagerEx *getAssetsManagerEx() const { return _manager; }; + inline cc::extension::AssetsManagerEx *getAssetsManagerEx() const { return _manager; }; bool isResuming() const; @@ -82,14 +82,14 @@ public: public: /** Constructor */ - EventAssetsManagerEx(const std::string& eventName, cocos2d::extension::AssetsManagerEx *manager, const EventCode &code, const std::string& assetId = "", const std::string& message = "", int curle_code = 0, int curlm_code = 0); + EventAssetsManagerEx(const std::string& eventName, cc::extension::AssetsManagerEx *manager, const EventCode &code, const std::string& assetId = "", const std::string& message = "", int curle_code = 0, int curlm_code = 0); private: virtual ~EventAssetsManagerEx() {} EventCode _code; - cocos2d::extension::AssetsManagerEx *_manager; + cc::extension::AssetsManagerEx *_manager; std::string _message; diff --git a/native/external/config.json b/native/external/config.json index 9af56f87aa..72f4fe3184 100644 --- a/native/external/config.json +++ b/native/external/config.json @@ -1,9 +1,9 @@ { - "version": "v3d-gfx-17", + "version": "v3d-gfx-18", "from": { "type": "github", "owner": "cocos-creator", "name": "cocos2d-x-lite-external", - "checkout": "v3d-gfx-17" + "checkout": "v3d-gfx-18" } } diff --git a/native/templates/js-template-android-instant/frameworks/runtime-src/Classes/AppDelegate.h b/native/templates/js-template-android-instant/frameworks/runtime-src/Classes/AppDelegate.h index 47bad3646d..cff2360685 100755 --- a/native/templates/js-template-android-instant/frameworks/runtime-src/Classes/AppDelegate.h +++ b/native/templates/js-template-android-instant/frameworks/runtime-src/Classes/AppDelegate.h @@ -30,7 +30,7 @@ The reason for implement as private inheritance is to hide some interface call by Director. */ -class AppDelegate : public cocos2d::Application +class AppDelegate : public cc::Application { public: AppDelegate(int width, int height); diff --git a/native/templates/js-template-default/frameworks/runtime-src/Classes/Game.cpp b/native/templates/js-template-default/frameworks/runtime-src/Classes/Game.cpp index dad5d56a87..ceabd746f1 100755 --- a/native/templates/js-template-default/frameworks/runtime-src/Classes/Game.cpp +++ b/native/templates/js-template-default/frameworks/runtime-src/Classes/Game.cpp @@ -31,11 +31,11 @@ #include "cocos/scripting/js-bindings/event/EventDispatcher.h" #include "cocos/scripting/js-bindings/manual/jsb_classtype.hpp" -Game::Game(int width, int height) : cocos2d::Application(width, height) {} +Game::Game(int width, int height) : cc::Application(width, height) {} bool Game::init() { - cocos2d::Application::init(); + cc::Application::init(); se::ScriptEngine *se = se::ScriptEngine::getInstance(); @@ -68,20 +68,20 @@ bool Game::init() void Game::onPause() { - cocos2d::Application::onPause(); + cc::Application::onPause(); - cocos2d::CustomEvent event; + cc::CustomEvent event; event.name = EVENT_COME_TO_BACKGROUND; - cocos2d::EventDispatcher::dispatchCustomEvent(event); - cocos2d::EventDispatcher::dispatchEnterBackgroundEvent(); + cc::EventDispatcher::dispatchCustomEvent(event); + cc::EventDispatcher::dispatchEnterBackgroundEvent(); } void Game::onResume() { - cocos2d::Application::onResume(); + cc::Application::onResume(); - cocos2d::CustomEvent event; + cc::CustomEvent event; event.name = EVENT_COME_TO_FOREGROUND; - cocos2d::EventDispatcher::dispatchCustomEvent(event); - cocos2d::EventDispatcher::dispatchEnterForegroundEvent(); + cc::EventDispatcher::dispatchCustomEvent(event); + cc::EventDispatcher::dispatchEnterForegroundEvent(); } diff --git a/native/templates/js-template-default/frameworks/runtime-src/Classes/Game.h b/native/templates/js-template-default/frameworks/runtime-src/Classes/Game.h index dfcef339dd..e3a57ea846 100755 --- a/native/templates/js-template-default/frameworks/runtime-src/Classes/Game.h +++ b/native/templates/js-template-default/frameworks/runtime-src/Classes/Game.h @@ -30,7 +30,7 @@ The reason for implement as private inheritance is to hide some interface call by Director. */ -class Game : public cocos2d::Application +class Game : public cc::Application { public: /** diff --git a/native/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/jni/hellojavascript/main.cpp b/native/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/jni/hellojavascript/main.cpp index 47db0cde4e..4b1b54ae36 100755 --- a/native/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/jni/hellojavascript/main.cpp +++ b/native/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/jni/hellojavascript/main.cpp @@ -70,7 +70,7 @@ void handle_cmd(struct android_app* app, int32_t cmd) break; } - cocos2d::View::engineHandleCmd(app, cmd); + cc::View::engineHandleCmd(app, cmd); } void android_main(struct android_app* state) { @@ -78,9 +78,9 @@ void android_main(struct android_app* state) { memset(&savedState, 0, sizeof(savedState)); state->userData = &savedState; state->onAppCmd = handle_cmd; - state->onInputEvent = cocos2d::View::engineHandleInput; + state->onInputEvent = cc::View::engineHandleInput; savedState.app = state; - cocos2d::JniHelper::setAndroidApp(state); + cc::JniHelper::setAndroidApp(state); while (1) { diff --git a/native/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppDelegate.mm b/native/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppDelegate.mm index 99307c15b1..7ff38fd7fb 100755 --- a/native/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppDelegate.mm +++ b/native/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppDelegate.mm @@ -44,7 +44,7 @@ Game* game = nullptr; CGRect bounds = [[UIScreen mainScreen] bounds]; self.window = [[UIWindow alloc] initWithFrame: bounds]; - // Should create view controller first, cocos2d::Application will use it. + // Should create view controller first, cc::Application will use it. _viewController = [[ViewController alloc]init]; _viewController.view = [[View alloc] initWithFrame:bounds]; _viewController.view.contentScaleFactor = UIScreen.mainScreen.scale; diff --git a/native/templates/js-template-default/frameworks/runtime-src/proj.win32/AppDelegate.cpp b/native/templates/js-template-default/frameworks/runtime-src/proj.win32/AppDelegate.cpp index 910d1f22d0..ba41b10d3b 100644 --- a/native/templates/js-template-default/frameworks/runtime-src/proj.win32/AppDelegate.cpp +++ b/native/templates/js-template-default/frameworks/runtime-src/proj.win32/AppDelegate.cpp @@ -11,7 +11,7 @@ namespace { - std::weak_ptr gView; + std::weak_ptr gView; /** @brief This function changes the PVRFrame show/hide setting in register. @param bEnable If true show the PVRFrame window, otherwise hide. @@ -70,13 +70,13 @@ namespace } //exported function -std::shared_ptr cc_get_application_view() { +std::shared_ptr cc_get_application_view() { return gView.lock(); } AppDelegage::AppDelegage(const std::string &name, int width, int height) { - _view = std::make_shared(name, width, height); + _view = std::make_shared(name, width, height); _game = std::make_shared(width, height); gView = _view; diff --git a/native/templates/js-template-default/frameworks/runtime-src/proj.win32/AppDelegate.h b/native/templates/js-template-default/frameworks/runtime-src/proj.win32/AppDelegate.h index 52c3d72674..fdb2ee4342 100644 --- a/native/templates/js-template-default/frameworks/runtime-src/proj.win32/AppDelegate.h +++ b/native/templates/js-template-default/frameworks/runtime-src/proj.win32/AppDelegate.h @@ -16,7 +16,7 @@ public: private: std::shared_ptr _game; - std::shared_ptr _view; + std::shared_ptr _view; bool _quit = false; }; \ No newline at end of file diff --git a/native/templates/js-template-link/frameworks/runtime-src/Classes/Game.cpp b/native/templates/js-template-link/frameworks/runtime-src/Classes/Game.cpp index dad5d56a87..ceabd746f1 100755 --- a/native/templates/js-template-link/frameworks/runtime-src/Classes/Game.cpp +++ b/native/templates/js-template-link/frameworks/runtime-src/Classes/Game.cpp @@ -31,11 +31,11 @@ #include "cocos/scripting/js-bindings/event/EventDispatcher.h" #include "cocos/scripting/js-bindings/manual/jsb_classtype.hpp" -Game::Game(int width, int height) : cocos2d::Application(width, height) {} +Game::Game(int width, int height) : cc::Application(width, height) {} bool Game::init() { - cocos2d::Application::init(); + cc::Application::init(); se::ScriptEngine *se = se::ScriptEngine::getInstance(); @@ -68,20 +68,20 @@ bool Game::init() void Game::onPause() { - cocos2d::Application::onPause(); + cc::Application::onPause(); - cocos2d::CustomEvent event; + cc::CustomEvent event; event.name = EVENT_COME_TO_BACKGROUND; - cocos2d::EventDispatcher::dispatchCustomEvent(event); - cocos2d::EventDispatcher::dispatchEnterBackgroundEvent(); + cc::EventDispatcher::dispatchCustomEvent(event); + cc::EventDispatcher::dispatchEnterBackgroundEvent(); } void Game::onResume() { - cocos2d::Application::onResume(); + cc::Application::onResume(); - cocos2d::CustomEvent event; + cc::CustomEvent event; event.name = EVENT_COME_TO_FOREGROUND; - cocos2d::EventDispatcher::dispatchCustomEvent(event); - cocos2d::EventDispatcher::dispatchEnterForegroundEvent(); + cc::EventDispatcher::dispatchCustomEvent(event); + cc::EventDispatcher::dispatchEnterForegroundEvent(); } diff --git a/native/templates/js-template-link/frameworks/runtime-src/Classes/Game.h b/native/templates/js-template-link/frameworks/runtime-src/Classes/Game.h index dfcef339dd..e3a57ea846 100755 --- a/native/templates/js-template-link/frameworks/runtime-src/Classes/Game.h +++ b/native/templates/js-template-link/frameworks/runtime-src/Classes/Game.h @@ -30,7 +30,7 @@ The reason for implement as private inheritance is to hide some interface call by Director. */ -class Game : public cocos2d::Application +class Game : public cc::Application { public: /** diff --git a/native/templates/js-template-link/frameworks/runtime-src/proj.android-studio/app/jni/hellojavascript/main.cpp b/native/templates/js-template-link/frameworks/runtime-src/proj.android-studio/app/jni/hellojavascript/main.cpp index 47db0cde4e..4b1b54ae36 100755 --- a/native/templates/js-template-link/frameworks/runtime-src/proj.android-studio/app/jni/hellojavascript/main.cpp +++ b/native/templates/js-template-link/frameworks/runtime-src/proj.android-studio/app/jni/hellojavascript/main.cpp @@ -70,7 +70,7 @@ void handle_cmd(struct android_app* app, int32_t cmd) break; } - cocos2d::View::engineHandleCmd(app, cmd); + cc::View::engineHandleCmd(app, cmd); } void android_main(struct android_app* state) { @@ -78,9 +78,9 @@ void android_main(struct android_app* state) { memset(&savedState, 0, sizeof(savedState)); state->userData = &savedState; state->onAppCmd = handle_cmd; - state->onInputEvent = cocos2d::View::engineHandleInput; + state->onInputEvent = cc::View::engineHandleInput; savedState.app = state; - cocos2d::JniHelper::setAndroidApp(state); + cc::JniHelper::setAndroidApp(state); while (1) { diff --git a/native/templates/js-template-link/frameworks/runtime-src/proj.ios_mac/ios/AppDelegate.mm b/native/templates/js-template-link/frameworks/runtime-src/proj.ios_mac/ios/AppDelegate.mm index 99307c15b1..7ff38fd7fb 100755 --- a/native/templates/js-template-link/frameworks/runtime-src/proj.ios_mac/ios/AppDelegate.mm +++ b/native/templates/js-template-link/frameworks/runtime-src/proj.ios_mac/ios/AppDelegate.mm @@ -44,7 +44,7 @@ Game* game = nullptr; CGRect bounds = [[UIScreen mainScreen] bounds]; self.window = [[UIWindow alloc] initWithFrame: bounds]; - // Should create view controller first, cocos2d::Application will use it. + // Should create view controller first, cc::Application will use it. _viewController = [[ViewController alloc]init]; _viewController.view = [[View alloc] initWithFrame:bounds]; _viewController.view.contentScaleFactor = UIScreen.mainScreen.scale; diff --git a/native/templates/js-template-link/frameworks/runtime-src/proj.win32/AppDelegate.cpp b/native/templates/js-template-link/frameworks/runtime-src/proj.win32/AppDelegate.cpp index 910d1f22d0..ba41b10d3b 100644 --- a/native/templates/js-template-link/frameworks/runtime-src/proj.win32/AppDelegate.cpp +++ b/native/templates/js-template-link/frameworks/runtime-src/proj.win32/AppDelegate.cpp @@ -11,7 +11,7 @@ namespace { - std::weak_ptr gView; + std::weak_ptr gView; /** @brief This function changes the PVRFrame show/hide setting in register. @param bEnable If true show the PVRFrame window, otherwise hide. @@ -70,13 +70,13 @@ namespace } //exported function -std::shared_ptr cc_get_application_view() { +std::shared_ptr cc_get_application_view() { return gView.lock(); } AppDelegage::AppDelegage(const std::string &name, int width, int height) { - _view = std::make_shared(name, width, height); + _view = std::make_shared(name, width, height); _game = std::make_shared(width, height); gView = _view; diff --git a/native/templates/js-template-link/frameworks/runtime-src/proj.win32/AppDelegate.h b/native/templates/js-template-link/frameworks/runtime-src/proj.win32/AppDelegate.h index 52c3d72674..247ec0e8a9 100644 --- a/native/templates/js-template-link/frameworks/runtime-src/proj.win32/AppDelegate.h +++ b/native/templates/js-template-link/frameworks/runtime-src/proj.win32/AppDelegate.h @@ -4,7 +4,7 @@ #include #include -namespace cocos2d { +namespace cc { class View; }; @@ -16,7 +16,7 @@ public: private: std::shared_ptr _game; - std::shared_ptr _view; + std::shared_ptr _view; bool _quit = false; }; \ No newline at end of file diff --git a/native/templates/js-template-link/frameworks/runtime-src/proj.win32/main.cpp b/native/templates/js-template-link/frameworks/runtime-src/proj.win32/main.cpp index decd1ce01d..631c37fb66 100755 --- a/native/templates/js-template-link/frameworks/runtime-src/proj.win32/main.cpp +++ b/native/templates/js-template-link/frameworks/runtime-src/proj.win32/main.cpp @@ -27,7 +27,7 @@ #include "AppDelegate.h" #include "sdl2/SDL.h" -USING_NS_CC; +using namespace cc; // uncomment below line, open debug console // #define USE_WIN32_CONSOLE diff --git a/native/tools/bindings-generator b/native/tools/bindings-generator index 52a7db94e6..824baea31e 160000 --- a/native/tools/bindings-generator +++ b/native/tools/bindings-generator @@ -1 +1 @@ -Subproject commit 52a7db94e683c367cc1d49c2ce321deb2fd2680e +Subproject commit 824baea31ef9890ec81c0d1a7a8738857ea2a849