diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC10242.png b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_1024.png similarity index 100% rename from ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC10242.png rename to ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_1024.png diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_120.png b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_120.png new file mode 100644 index 000000000..7c1a84ab6 Binary files /dev/null and b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_120.png differ diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_152.png b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_152.png new file mode 100644 index 000000000..6a6c1d6c2 Binary files /dev/null and b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_152.png differ diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_167.png b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_167.png new file mode 100644 index 000000000..03b2a1404 Binary files /dev/null and b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_167.png differ diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_180.png b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_180.png new file mode 100644 index 000000000..68b1c2c25 Binary files /dev/null and b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_180.png differ diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_40.png b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_40.png new file mode 100644 index 000000000..2a92b7c7e Binary files /dev/null and b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_40.png differ diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_76.png b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_76.png new file mode 100644 index 000000000..11a57d6af Binary files /dev/null and b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_76.png differ diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_80.png b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_80.png new file mode 100644 index 000000000..327bb4f58 Binary files /dev/null and b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/CC_80.png differ diff --git a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/Contents.json index 9f58edf29..e0639a4aa 100644 --- a/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/ClassiCube/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -23,21 +23,25 @@ { "idiom" : "iphone", "size" : "40x40", + "filename" : "CC_80.png", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", + "filename" : "CC_120.png", "scale" : "3x" }, { "idiom" : "iphone", "size" : "60x60", + "filename" : "CC_120.png", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", + "filename" : "CC_180.png", "scale" : "3x" }, { @@ -63,32 +67,37 @@ { "idiom" : "ipad", "size" : "40x40", + "filename" : "CC_40.png", "scale" : "1x" }, { "idiom" : "ipad", "size" : "40x40", + "filename" : "CC_80.png", "scale" : "2x" }, { "idiom" : "ipad", "size" : "76x76", + "filename" : "CC_76.png", "scale" : "1x" }, { "idiom" : "ipad", "size" : "76x76", + "filename" : "CC_152.png", "scale" : "2x" }, { "idiom" : "ipad", "size" : "83.5x83.5", + "filename" : "CC_167.png", "scale" : "2x" }, { "size" : "1024x1024", "idiom" : "ios-marketing", - "filename" : "CC10242.png", + "filename" : "CC_1024.png", "scale" : "1x" } ], diff --git a/misc/CC1024.png b/misc/CC1024.png deleted file mode 100644 index 0bc82c30e..000000000 Binary files a/misc/CC1024.png and /dev/null differ diff --git a/misc/CC10242.png b/misc/CC10242.png deleted file mode 100644 index 84ccce9c0..000000000 Binary files a/misc/CC10242.png and /dev/null differ diff --git a/src/Platform.h b/src/Platform.h index 5a1e1a5ed..7300962d1 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -172,6 +172,7 @@ typedef void (*Directory_EnumCallback)(const cc_string* filename, void* obj); CC_API cc_result Directory_Enum(const cc_string* path, void* obj, Directory_EnumCallback callback); /* Returns non-zero if the given file exists. */ CC_API int File_Exists(const cc_string* path); +void Directory_GetCachePath(cc_string* path, const char* folder); /* Attempts to create a new (or overwrite) file for writing. */ /* NOTE: If the file already exists, its contents are discarded. */ diff --git a/src/Platform_Posix.c b/src/Platform_Posix.c index 6f478d429..b3a20d8d9 100644 --- a/src/Platform_Posix.c +++ b/src/Platform_Posix.c @@ -143,6 +143,10 @@ cc_uint64 Stopwatch_Measure(void) { /*########################################################################################################################* *-----------------------------------------------------Directory/File------------------------------------------------------* *#########################################################################################################################*/ +void Directory_GetCachePath(cc_string* path, const char* folder) { + String_AppendConst(path, folder); +} + cc_result Directory_Create(const cc_string* path) { char str[NATIVE_STR_LEN]; Platform_EncodeUtf8(str, path); diff --git a/src/Platform_Web.c b/src/Platform_Web.c index 22d5bd8a7..2a38fcfb6 100644 --- a/src/Platform_Web.c +++ b/src/Platform_Web.c @@ -97,6 +97,10 @@ cc_uint64 Stopwatch_Measure(void) { /*########################################################################################################################* *-----------------------------------------------------Directory/File------------------------------------------------------* *#########################################################################################################################*/ +void Directory_GetCachePath(cc_string* path, const char* folder) { + String_AppendConst(path, folder); +} + extern void interop_InitFilesystem(void); cc_result Directory_Create(const cc_string* path) { /* Web filesystem doesn't need directories */ diff --git a/src/Platform_WinApi.c b/src/Platform_WinApi.c index a7f929721..bb1c95fa9 100644 --- a/src/Platform_WinApi.c +++ b/src/Platform_WinApi.c @@ -137,6 +137,10 @@ cc_uint64 Stopwatch_Measure(void) { /*########################################################################################################################* *-----------------------------------------------------Directory/File------------------------------------------------------* *#########################################################################################################################*/ +void Directory_GetCachePath(cc_string* path, const char* folder) { + String_AppendConst(path, folder); +} + cc_result Directory_Create(const cc_string* path) { WCHAR str[NATIVE_STR_LEN]; cc_result res; diff --git a/src/Resources.c b/src/Resources.c index a4b6bfe1c..eb9da0e23 100644 --- a/src/Resources.c +++ b/src/Resources.c @@ -24,8 +24,8 @@ struct ResourceZipEntry { /* zip data */ cc_uint32 type : 3; cc_uint32 size : 29; - cc_uint32 offset, crc32; union ResourceValue value; + cc_uint32 offset, crc32; }; #define RESOURCE_TYPE_DATA 1 #define RESOURCE_TYPE_PNG 2 @@ -413,7 +413,7 @@ static struct ResourceZipEntry defaultZipEntries[] = { /* other files */ { "snow.png", RESOURCE_TYPE_DATA }, { "chicken.png", RESOURCE_TYPE_DATA }, { "gui.png", RESOURCE_TYPE_DATA }, { "animations.png", RESOURCE_TYPE_PNG }, - { "animations.txt", RESOURCE_TYPE_CONST, sizeof(ANIMS_TXT) - 1, 0,0, (const cc_uint8*)ANIMS_TXT }, + { "animations.txt", RESOURCE_TYPE_CONST, sizeof(ANIMS_TXT) - 1, (const cc_uint8*)ANIMS_TXT }, #ifdef CC_BUILD_MOBILE { "touch.png", RESOURCE_TYPE_DATA } #endif diff --git a/src/Screens.c b/src/Screens.c index 9fa4ebc27..5d42b0936 100644 --- a/src/Screens.c +++ b/src/Screens.c @@ -186,7 +186,6 @@ static void HUDScreen_ContextRecreated(void* screen) { static const cc_string prefix = String_FromConst("Position: "); struct HUDScreen* s = (struct HUDScreen*)screen; - struct TextWidget* line1 = &s->line1; struct TextWidget* line2 = &s->line2; Font_Make(&s->font, 16, FONT_FLAGS_PADDING); diff --git a/src/Server.c b/src/Server.c index 1073106a7..bec91ffa9 100644 --- a/src/Server.c +++ b/src/Server.c @@ -342,8 +342,6 @@ static void MPConnection_Disconnect(void) { } static void MPConnection_CheckDisconnection(void) { - static const cc_string title = String_FromConst("Disconnected!"); - static const cc_string reason = String_FromConst("You've lost connection to the server"); cc_result availRes, selectRes; int pending = 0; cc_bool poll_read; diff --git a/src/TexturePack.c b/src/TexturePack.c index 8c313b448..80f5261a3 100644 --- a/src/TexturePack.c +++ b/src/TexturePack.c @@ -197,7 +197,8 @@ CC_NOINLINE static void MakeCachePath(cc_string* path, const cc_string* url) { String_InitArray(key, keyBuffer); HashUrl(&key, url); - String_Format1(path, "texturecache/%s", &key); + Directory_GetCachePath(path, "texturecache"); + String_Format1(path, "/%s", &key); } /* Returns non-zero if given URL has been cached */ diff --git a/src/Widgets.c b/src/Widgets.c index eb825fe82..c8847f3ce 100644 --- a/src/Widgets.c +++ b/src/Widgets.c @@ -2581,7 +2581,7 @@ void SpecialInputWidget_Create(struct SpecialInputWidget* w, struct FontDesc* fo static void ThumbstickWidget_Rotate(void* widget, struct VertexTextured** vertices, int offset) { struct ThumbstickWidget* w = (struct ThumbstickWidget*)widget; struct VertexTextured* ptr; - int i, x, y; + int i; ptr = *vertices - 4; for (i = 0; i < 4; i++) { diff --git a/src/Window.h b/src/Window.h index 6d1d271d4..ff7bd106c 100644 --- a/src/Window.h +++ b/src/Window.h @@ -129,13 +129,13 @@ void Cursor_SetPosition(int x, int y); /* Shows a dialog box window. */ CC_API void Window_ShowDialog(const char* title, const char* msg); -#define OFD_UPLOAD_DELETE 0 /* (webclient) Deletes the uploaded file after invoking callback function */ +#define OFD_UPLOAD_DELETE 0 /* (webclient) Deletes the uploaded file after invoking callback function */ #define OFD_UPLOAD_PERSIST 1 /* (webclient) Saves the uploded file into IndexedDB */ typedef void (*OpenFileDialogCallback)(const cc_string* path); struct OpenFileDialogArgs { const char* description; /* Describes the types of files supported (e.g. "Texture packs") */ - const char* const* filters; + const char* const* filters; /* File extensions to limit dialog to showing (e.g. ".zip", NULL) */ OpenFileDialogCallback Callback; int uploadAction; /* Action webclient takes after invoking callback function */ const char* uploadFolder; /* For webclient, folder to upload the file to */ diff --git a/src/interop_ios.m b/src/interop_ios.m index f7797d009..d44a0aa99 100644 --- a/src/interop_ios.m +++ b/src/interop_ios.m @@ -485,7 +485,7 @@ void Window_LockLandscapeOrientation(cc_bool lock) { } cc_result Window_OpenFileDialog(const struct OpenFileDialogArgs* args) { - // see the custom UTITypes declared in Info.plist + // see the custom UTITypes declared in Info.plist NSDictionary* fileExt_map = @{ @".cw" : @"com.classicube.client.ios-cw",