Pārlūkot izejas kodu

iOS compile fixes.

Aren Villanueva 9 gadi atpakaļ
vecāks
revīzija
402c24ec8b

+ 2 - 2
drivers/gles2/rasterizer_gles2.h

@@ -111,7 +111,7 @@ class RasterizerGLES2 : public Rasterizer {
 
 	Image _get_gl_image_and_format(const Image& p_image, Image::Format p_format, uint32_t p_flags,GLenum& r_gl_format,GLenum& r_gl_internal_format,int &r_gl_components,bool &r_has_alpha_cache,bool &r_compressed);
 
-	class RenderTarget;
+	struct RenderTarget;
 
 	struct Texture {
 
@@ -305,7 +305,7 @@ class RasterizerGLES2 : public Rasterizer {
 		virtual ~GeometryOwner() {}
 	};
 
-	class Mesh;
+	struct Mesh;
 
 	struct Surface : public Geometry {
 

+ 1 - 1
drivers/gles2/shader_compiler_gles2.h

@@ -34,7 +34,7 @@ class ShaderCompilerGLES2 {
 
 	class Uniform;
 public:
-	class Flags;
+	struct Flags;
 private:
 
 	ShaderLanguage::ProgramNode *program_node;

+ 2 - 0
platform/iphone/app_delegate.mm

@@ -56,6 +56,8 @@
 #import "Appirater.h"
 #endif
 
+Error _shell_open(String);
+
 Error _shell_open(String p_uri) {
 	NSString* url = [[NSString alloc] initWithUTF8String:p_uri.utf8().get_data()];
 

+ 1 - 1
platform/iphone/game_center.mm

@@ -30,8 +30,8 @@
 
 #include "game_center.h"
 
-extern "C" {
 #import <GameKit/GameKit.h>
+extern "C" {
 #import "app_delegate.h"
 };
 

+ 9 - 1
platform/iphone/gl_view.mm

@@ -54,6 +54,14 @@ static bool video_playing = false;
 static float video_previous_volume = 0.0f;
 static CMTime video_current_time;
 
+void _show_keyboard(String);
+void _hide_keyboard();
+bool _play_video(String, float, String, String);
+bool _is_video_playing();
+void _focus_out_video();
+void _unpause_video();
+void _stop_video();
+
 void _show_keyboard(String p_existing) {
 	keyboard_text = p_existing;
 	printf("instance on show is %p\n", _instance);
@@ -618,7 +626,7 @@ static void clear_touches() {
 
 - (void)audioRouteChangeListenerCallback:(NSNotification*)notification
 {
-	printf("*********** route changed!%i\n");
+	printf("*********** route changed!\n");
 	NSDictionary *interuptionDict = notification.userInfo;
 
 	NSInteger routeChangeReason = [[interuptionDict valueForKey:AVAudioSessionRouteChangeReasonKey] integerValue];

+ 2 - 0
platform/iphone/godot_iphone.cpp

@@ -40,6 +40,8 @@ int add_path(int p_argc, char** p_args);
 int add_cmdline(int p_argc, char** p_args);
 };
 
+int iphone_main(int, int, int, char**);
+
 int iphone_main(int width, int height, int argc, char** argv) {
 
 	int len = strlen(argv[0]);

+ 0 - 2
platform/iphone/icloud.mm

@@ -30,10 +30,8 @@
 
 #include "icloud.h"
 
-extern "C" {
 #import <Foundation/Foundation.h>
 #import "app_delegate.h"
-};
 
 ICloud* ICloud::instance = NULL;
 

+ 5 - 0
platform/iphone/sem_iphone.cpp

@@ -31,6 +31,11 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+void cgsem_init(cgsem_t*);
+void cgsem_post(cgsem_t*);
+void cgsem_wait(cgsem_t*);
+void cgsem_destroy(cgsem_t*);
+
 void cgsem_init(cgsem_t *cgsem)
 {
 	int flags, fd, i;

+ 3 - 0
platform/iphone/view_controller.mm

@@ -32,6 +32,9 @@
 
 extern "C" {
 
+int add_path(int, char**);
+int add_cmdline(int, char**);
+
 int add_path(int p_argc, char** p_args) {
 
 	NSString* str = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"godot_path"];