iOS: Add app icons

This commit is contained in:
UnknownShadow200 2022-10-15 16:42:54 +11:00
parent 511c66e405
commit 46ccf99c67
22 changed files with 31 additions and 11 deletions

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -23,21 +23,25 @@
{ {
"idiom" : "iphone", "idiom" : "iphone",
"size" : "40x40", "size" : "40x40",
"filename" : "CC_80.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone", "idiom" : "iphone",
"size" : "40x40", "size" : "40x40",
"filename" : "CC_120.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
"idiom" : "iphone", "idiom" : "iphone",
"size" : "60x60", "size" : "60x60",
"filename" : "CC_120.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone", "idiom" : "iphone",
"size" : "60x60", "size" : "60x60",
"filename" : "CC_180.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
@ -63,32 +67,37 @@
{ {
"idiom" : "ipad", "idiom" : "ipad",
"size" : "40x40", "size" : "40x40",
"filename" : "CC_40.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "ipad", "idiom" : "ipad",
"size" : "40x40", "size" : "40x40",
"filename" : "CC_80.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "ipad", "idiom" : "ipad",
"size" : "76x76", "size" : "76x76",
"filename" : "CC_76.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "ipad", "idiom" : "ipad",
"size" : "76x76", "size" : "76x76",
"filename" : "CC_152.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "ipad", "idiom" : "ipad",
"size" : "83.5x83.5", "size" : "83.5x83.5",
"filename" : "CC_167.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"size" : "1024x1024", "size" : "1024x1024",
"idiom" : "ios-marketing", "idiom" : "ios-marketing",
"filename" : "CC10242.png", "filename" : "CC_1024.png",
"scale" : "1x" "scale" : "1x"
} }
], ],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@ -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); CC_API cc_result Directory_Enum(const cc_string* path, void* obj, Directory_EnumCallback callback);
/* Returns non-zero if the given file exists. */ /* Returns non-zero if the given file exists. */
CC_API int File_Exists(const cc_string* path); 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. */ /* Attempts to create a new (or overwrite) file for writing. */
/* NOTE: If the file already exists, its contents are discarded. */ /* NOTE: If the file already exists, its contents are discarded. */

View File

@ -143,6 +143,10 @@ cc_uint64 Stopwatch_Measure(void) {
/*########################################################################################################################* /*########################################################################################################################*
*-----------------------------------------------------Directory/File------------------------------------------------------* *-----------------------------------------------------Directory/File------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
void Directory_GetCachePath(cc_string* path, const char* folder) {
String_AppendConst(path, folder);
}
cc_result Directory_Create(const cc_string* path) { cc_result Directory_Create(const cc_string* path) {
char str[NATIVE_STR_LEN]; char str[NATIVE_STR_LEN];
Platform_EncodeUtf8(str, path); Platform_EncodeUtf8(str, path);

View File

@ -97,6 +97,10 @@ cc_uint64 Stopwatch_Measure(void) {
/*########################################################################################################################* /*########################################################################################################################*
*-----------------------------------------------------Directory/File------------------------------------------------------* *-----------------------------------------------------Directory/File------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
void Directory_GetCachePath(cc_string* path, const char* folder) {
String_AppendConst(path, folder);
}
extern void interop_InitFilesystem(void); extern void interop_InitFilesystem(void);
cc_result Directory_Create(const cc_string* path) { cc_result Directory_Create(const cc_string* path) {
/* Web filesystem doesn't need directories */ /* Web filesystem doesn't need directories */

View File

@ -137,6 +137,10 @@ cc_uint64 Stopwatch_Measure(void) {
/*########################################################################################################################* /*########################################################################################################################*
*-----------------------------------------------------Directory/File------------------------------------------------------* *-----------------------------------------------------Directory/File------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
void Directory_GetCachePath(cc_string* path, const char* folder) {
String_AppendConst(path, folder);
}
cc_result Directory_Create(const cc_string* path) { cc_result Directory_Create(const cc_string* path) {
WCHAR str[NATIVE_STR_LEN]; WCHAR str[NATIVE_STR_LEN];
cc_result res; cc_result res;

View File

@ -24,8 +24,8 @@ struct ResourceZipEntry {
/* zip data */ /* zip data */
cc_uint32 type : 3; cc_uint32 type : 3;
cc_uint32 size : 29; cc_uint32 size : 29;
cc_uint32 offset, crc32;
union ResourceValue value; union ResourceValue value;
cc_uint32 offset, crc32;
}; };
#define RESOURCE_TYPE_DATA 1 #define RESOURCE_TYPE_DATA 1
#define RESOURCE_TYPE_PNG 2 #define RESOURCE_TYPE_PNG 2
@ -413,7 +413,7 @@ static struct ResourceZipEntry defaultZipEntries[] = {
/* other files */ /* other files */
{ "snow.png", RESOURCE_TYPE_DATA }, { "chicken.png", RESOURCE_TYPE_DATA }, { "snow.png", RESOURCE_TYPE_DATA }, { "chicken.png", RESOURCE_TYPE_DATA },
{ "gui.png", RESOURCE_TYPE_DATA }, { "animations.png", RESOURCE_TYPE_PNG }, { "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 #ifdef CC_BUILD_MOBILE
{ "touch.png", RESOURCE_TYPE_DATA } { "touch.png", RESOURCE_TYPE_DATA }
#endif #endif

View File

@ -186,7 +186,6 @@ static void HUDScreen_ContextRecreated(void* screen) {
static const cc_string prefix = String_FromConst("Position: "); static const cc_string prefix = String_FromConst("Position: ");
struct HUDScreen* s = (struct HUDScreen*)screen; struct HUDScreen* s = (struct HUDScreen*)screen;
struct TextWidget* line1 = &s->line1;
struct TextWidget* line2 = &s->line2; struct TextWidget* line2 = &s->line2;
Font_Make(&s->font, 16, FONT_FLAGS_PADDING); Font_Make(&s->font, 16, FONT_FLAGS_PADDING);

View File

@ -342,8 +342,6 @@ static void MPConnection_Disconnect(void) {
} }
static void MPConnection_CheckDisconnection(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; cc_result availRes, selectRes;
int pending = 0; int pending = 0;
cc_bool poll_read; cc_bool poll_read;

View File

@ -197,7 +197,8 @@ CC_NOINLINE static void MakeCachePath(cc_string* path, const cc_string* url) {
String_InitArray(key, keyBuffer); String_InitArray(key, keyBuffer);
HashUrl(&key, url); 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 */ /* Returns non-zero if given URL has been cached */

View File

@ -2581,7 +2581,7 @@ void SpecialInputWidget_Create(struct SpecialInputWidget* w, struct FontDesc* fo
static void ThumbstickWidget_Rotate(void* widget, struct VertexTextured** vertices, int offset) { static void ThumbstickWidget_Rotate(void* widget, struct VertexTextured** vertices, int offset) {
struct ThumbstickWidget* w = (struct ThumbstickWidget*)widget; struct ThumbstickWidget* w = (struct ThumbstickWidget*)widget;
struct VertexTextured* ptr; struct VertexTextured* ptr;
int i, x, y; int i;
ptr = *vertices - 4; ptr = *vertices - 4;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {

View File

@ -135,7 +135,7 @@ typedef void (*OpenFileDialogCallback)(const cc_string* path);
struct OpenFileDialogArgs { struct OpenFileDialogArgs {
const char* description; /* Describes the types of files supported (e.g. "Texture packs") */ 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; OpenFileDialogCallback Callback;
int uploadAction; /* Action webclient takes after invoking callback function */ int uploadAction; /* Action webclient takes after invoking callback function */
const char* uploadFolder; /* For webclient, folder to upload the file to */ const char* uploadFolder; /* For webclient, folder to upload the file to */