• CCPlatformConfig(设置执行平台 iOS android win32等。。。)



    #ifndef __CC_PLATFORM_CONFIG_H__

    #define __CC_PLATFORM_CONFIG_H__


    /**

    Config of cocos2d-x project, per target platform.

    */


    //////////////////////////////////////////////////////////////////////////

    // pre configure(安装)

    //////////////////////////////////////////////////////////////////////////


    // define supported target platform macro(宏) which CC uses.    //定义支持平台宏值

    #define CC_PLATFORM_UNKNOWN            0

    #define CC_PLATFORM_IOS                1

    #define CC_PLATFORM_ANDROID            2

    #define CC_PLATFORM_WIN32              3

    #define CC_PLATFORM_MARMALADE          4

    #define CC_PLATFORM_LINUX              5

    #define CC_PLATFORM_BADA               6

    #define CC_PLATFORM_BLACKBERRY         7

    #define CC_PLATFORM_MAC                8

    #define CC_PLATFORM_NACL               9

    #define CC_PLATFORM_EMSCRIPTEN        10

    #define CC_PLATFORM_TIZEN             11


    // Determine(确定) target platform by compile(编译) environment(环境) macro.

    #define CC_TARGET_PLATFORM             CC_PLATFORM_UNKNOWN


    // mac

    #if defined(CC_TARGET_OS_MAC)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM         CC_PLATFORM_MAC

    #endif


    // iphone

    #if defined(CC_TARGET_OS_IPHONE)

        #undef  CC_TARGET_PLATFORM

        #define CC_TARGET_PLATFORM         CC_PLATFORM_IOS

    #endif


    // android

    #if defined(ANDROID)

        #undef  CC_TARGET_PLATFORM

        #define CC_TARGET_PLATFORM         CC_PLATFORM_ANDROID

    #endif


    // win32

    #if defined(WIN32) && defined(_WINDOWS)

        #undef  CC_TARGET_PLATFORM

        #define CC_TARGET_PLATFORM         CC_PLATFORM_WIN32

    #endif


    // linux

    #if defined(LINUX)

        #undef  CC_TARGET_PLATFORM

        #define CC_TARGET_PLATFORM         CC_PLATFORM_LINUX

    #endif


    // marmalade

    #if defined(MARMALADE)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM         CC_PLATFORM_MARMALADE

    #endif


    // bada

    #if defined(SHP)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM         CC_PLATFORM_BADA

    #endif


    // qnx

    #if defined(__QNX__)

        #undef  CC_TARGET_PLATFORM

        #define CC_TARGET_PLATFORM     CC_PLATFORM_BLACKBERRY

    #endif


    // native client

    #if defined(__native_client__)

        #undef  CC_TARGET_PLATFORM

        #define CC_TARGET_PLATFORM     CC_PLATFORM_NACL

    #endif


    // Emscripten

    #if defined(EMSCRIPTEN)

        #undef  CC_TARGET_PLATFORM

        #define CC_TARGET_PLATFORM     CC_PLATFORM_EMSCRIPTEN

    #endif


    // tizen

    #if defined(TIZEN)

        #undef  CC_TARGET_PLATFORM

        #define CC_TARGET_PLATFORM     CC_PLATFORM_TIZEN

    #endif


    //////////////////////////////////////////////////////////////////////////

    // post configure(安装)

    //////////////////////////////////////////////////////////////////////////


    // check user set platform

    #if ! CC_TARGET_PLATFORM

        #error  "Cannot recognize the target platform; are you targeting an unsupported platform?

    "

    #endif 


    #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)

    #pragma warning (disable:4127)  

    #endif  // CC_PLATFORM_WIN32


    #endif  // __CC_PLATFORM_CONFIG_H__


  • 相关阅读:
    E. Directing Edges 解析(思維、拓樸排序)
    E. Modular Stability 解析(思維、數論、組合)
    E1. Weights Division (easy version) 解析(思維、優先佇列、樹狀DP)
    D. Prefixes and Suffixes 解析(思維、字串、Z-Algo)
    B. Jzzhu and Cities 解析(思維、最短路)
    D. Captain Flint and Treasure 解析(拓樸排序、Stack)
    B. Suffix Operations
    SPOJ-COT Count on a tree(树上的可持久化线段树)
    UPC GCPC2019 K: Move & Meet
    F. x-prime Substrings(AC自动机 + dp)
  • 原文地址:https://www.cnblogs.com/cxchanpin/p/6782251.html
Copyright © 2020-2023  润新知