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 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 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",
"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"
}
],

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);
/* 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. */

View file

@ -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);

View file

@ -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 */

View file

@ -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;

View file

@ -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

View file

@ -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);

View file

@ -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;

View file

@ -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 */

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) {
struct ThumbstickWidget* w = (struct ThumbstickWidget*)widget;
struct VertexTextured* ptr;
int i, x, y;
int i;
ptr = *vertices - 4;
for (i = 0; i < 4; i++) {

View file

@ -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 */

View file

@ -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<NSString*, NSString*>* fileExt_map =
@{
@".cw" : @"com.classicube.client.ios-cw",