mirror of https://github.com/axmolengine/axmol.git
Only compile iOS files on iOS
This commit is contained in:
parent
1f4ca2f0ad
commit
b96c4f1ad0
|
@ -1 +1 @@
|
|||
99ea8c15ffe770eb2acd216155c34866bbd4a645
|
||||
91c2f471146ed7285ab1d0f093185ffbbd06896c
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CC_APPLICATION_IOS_H__
|
||||
#define __CC_APPLICATION_IOS_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCApplicationProtocol.h"
|
||||
|
||||
|
@ -90,4 +93,6 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
||||
#endif // end of __CC_APPLICATION_IOS_H__
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#import "CCApplication.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "CCGeometry.h"
|
||||
|
@ -152,3 +154,5 @@ void Application::applicationScreenSizeChanged(int newWidth, int newHeight) {
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
@ -54,3 +57,5 @@ void LuaLog(const char * format)
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
|
@ -22,6 +22,11 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include "CCDevice.h"
|
||||
#include "ccTypes.h"
|
||||
#include "CCEventDispatcher.h"
|
||||
|
@ -174,3 +179,5 @@ void Device::setAccelerometerInterval(float interval)
|
|||
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
|
@ -61,6 +61,9 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
|
||||
*/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <OpenGLES/EAGL.h>
|
||||
#import <OpenGLES/EAGLDrawable.h>
|
||||
|
@ -155,3 +158,5 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
-(void) doAnimationWhenKeyboardMoveWithDuration:(float) duration distance:(float) dis;
|
||||
-(void) doAnimationWhenAnotherEditBeClicked;
|
||||
@end
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
|
@ -61,6 +61,9 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
|
||||
*/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import "CCEGLView.h"
|
||||
#import "CCEAGLView.h"
|
||||
|
@ -922,3 +925,5 @@ static CCEAGLView *__view = 0;
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
#ifndef __CC_EGLVIEW_IPHONE_H__
|
||||
#define __CC_EGLVIEW_IPHONE_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include "CCObject.h"
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCEGLViewProtocol.h"
|
||||
|
@ -59,4 +62,6 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
||||
#endif // end of __CC_EGLVIEW_IPHONE_H__
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include "CCEAGLView.h"
|
||||
#include "CCDirectorCaller.h"
|
||||
#include "CCEGLView.h"
|
||||
|
@ -125,6 +130,7 @@ void EGLView::setIMEKeyboardState(bool bOpen)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_PLATFOR_IOS
|
||||
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
// Only compile this code on iOS. These files should NOT be included on your Mac project.
|
||||
// But in case they are included, it won't be compiled.
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#import "CCPlatformMacros.h"
|
||||
#import "CCESRenderer.h"
|
||||
#import <OpenGLES/ES2/gl.h>
|
||||
|
@ -76,4 +80,4 @@
|
|||
@end
|
||||
|
||||
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
|
@ -28,8 +28,11 @@
|
|||
// Only compile this code on iOS. These files should NOT be included on your Mac project.
|
||||
// But in case they are included, it won't be compiled.
|
||||
|
||||
#import "CCPlatformMacros.h"
|
||||
#import "CCES2Renderer.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#import "CCPlatformMacros.h"
|
||||
#import "OpenGL_Internal.h"
|
||||
|
||||
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0
|
||||
|
@ -251,3 +254,5 @@
|
|||
|
||||
@end
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
// Only compile this code on iOS. These files should NOT be included on your Mac project.
|
||||
// But in case they are included, it won't be compiled.
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include "CCPlatformMacros.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
|
@ -48,3 +52,4 @@
|
|||
- (unsigned int) msaaColorBuffer;
|
||||
@end
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __PLATFORM_IOS_CCGL_H__
|
||||
#define __PLATFORM_IOS_CCGL_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#define glClearDepth glClearDepthf
|
||||
#define glDeleteVertexArrays glDeleteVertexArraysOES
|
||||
#define glGenVertexArrays glGenVertexArraysOES
|
||||
|
@ -39,5 +42,7 @@ THE SOFTWARE.
|
|||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
||||
#endif // __PLATFORM_IOS_CCGL_H__
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include "CCImageCommon_cpp.h"
|
||||
|
||||
#import "CCImage.h"
|
||||
|
@ -468,3 +472,5 @@ bool Image::saveToFile(const std::string& filename, bool isToRGB)
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ THE SOFTWARE.
|
|||
#ifndef __CCPLATFORMDEFINE_H__
|
||||
#define __CCPLATFORMDEFINE_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#define CC_DLL
|
||||
|
@ -44,5 +47,6 @@ THE SOFTWARE.
|
|||
#endif
|
||||
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
||||
#endif /* __CCPLATFORMDEFINE_H__*/
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CC_STD_C_H__
|
||||
#define __CC_STD_C_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#include "CCPlatformMacros.h"
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
|
@ -45,4 +48,5 @@ THE SOFTWARE.
|
|||
#define MAX(x,y) (((x) < (y)) ? (y) : (x))
|
||||
#endif // MAX
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
#endif // __CC_STD_C_H__
|
||||
|
|
|
@ -61,6 +61,9 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
|
||||
*/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
/* Generic error reporting */
|
||||
#define REPORT_ERROR(__FORMAT__, ...) printf("%s: %s\n", __FUNCTION__, [[NSString stringWithFormat:__FORMAT__, __VA_ARGS__] UTF8String])
|
||||
|
||||
|
@ -79,3 +82,5 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
#endif
|
||||
#define TEST_DELEGATE_METHOD_BIT(__BIT__) (self->__DELEGATE_METHODS_IVAR__ & (1 << __BIT__))
|
||||
#define SET_DELEGATE_METHOD_BIT(__BIT__, __NAME__) { if([self->__DELEGATE_IVAR__ respondsToSelector:@selector(__NAME__)]) self->__DELEGATE_METHODS_IVAR__ |= (1 << __BIT__); else self->__DELEGATE_METHODS_IVAR__ &= ~(1 << __BIT__); }
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
|
@ -23,6 +23,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#import <TargetConditionals.h>
|
||||
|
||||
// when compiling to ARM (iPhone device), hide everything and use system defaults
|
||||
|
@ -73,4 +77,6 @@ THE SOFTWARE.
|
|||
|
||||
@end
|
||||
|
||||
#endif
|
||||
#endif // !TARGET_CPU_ARM
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
|
@ -26,6 +26,8 @@ THE SOFTWARE.
|
|||
|
||||
#import "AccelerometerSimulation.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
// when compiling to ARM (iPhone device), hide everything and use system defaults
|
||||
// if you wish to use simulation mode even on the device, remove the #if/#endif
|
||||
#if !TARGET_CPU_ARM
|
||||
|
@ -263,4 +265,6 @@ static CCAccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
}
|
||||
@end
|
||||
|
||||
#endif
|
||||
#endif // !TARGET_CPU_ARM
|
||||
|
||||
#endif // CC_PLATFORM_IOS
|
||||
|
|
Loading…
Reference in New Issue