misc.c
来自「ANFY特效」· C语言 代码 · 共 1,430 行 · 第 1/3 页
C
1,430 行
return "tunnscr.txt"; case APPLET_TMAPCUBE: return "tcubescr.txt"; case APPLET_ANVOXEL: return "voxelscr.txt"; case APPLET_TUNNEL3D: return "tu3dscr.txt"; case APPLET_ANWATER: return "waterscr.txt"; case APPLET_WARP: return "warpscr.txt"; case APPLET_WORMHOLE: return "wormscr.txt"; case APPLET_FLAGLOAD: return "flaglscr.txt"; case APPLET_GALAXY: return "galascr.txt"; case APPLET_ANFY3D: return "anfy3dscr.txt"; case APPLET_WOBBLER: return "wobscr.txt"; case APPLET_TSCROLLER: return "txtscr.txt"; case APPLET_SOLIDSCROLLER: return "solidscr1.txt"; case APPLET_ANFYSNOW: return "snowscr.txt"; case APPLET_FIREWORKS: return "firewkscr.txt"; default: return ""; }}char* GetJarFile (int applet){ if (applet == APPLET_ANBLUR) return "anblur.jar"; else if (applet == APPLET_ANFYBUMP) return "anfybump.jar"; else if (applet == APPLET_ANFADE) return "AnFade.jar"; else if (applet == APPLET_ANFLAG) return "AnFlag.jar"; else if (applet == APPLET_ANFRACT) return "AnFract.jar"; else if (applet == APPLET_ANLAKE) return "AnLake.jar"; else if (applet == APPLET_ANLENS) return "AnLens.jar"; else if (applet == APPLET_BLOBS) return "blobs.jar"; else if (applet == APPLET_CUBEMENU) return "CubeMenu.jar"; else if (applet == APPLET_DEFORM) return "Deform.jar"; else if (applet == APPLET_FIRE) return "fire.jar"; else if (applet == APPLET_FLAGLOAD) return "FlagLoad.jar"; else if (applet == APPLET_FLOZOIDS) return "flozoids.jar"; else if (applet == APPLET_FLUID) return "fluid.jar"; else if (applet == APPLET_HUEROT) return "huerot.jar"; else if (applet == APPLET_MANDEL) return "mandel.jar"; else if (applet == APPLET_LIFE2D) return "life2d.jar"; else if (applet == APPLET_ROTATE) return "Rot2.jar"; else if (applet == APPLET_PLASMA) return "Plasma3.jar"; else if (applet == APPLET_ANTUNNEL) return "tunnel.jar"; else if (applet == APPLET_TMAPCUBE) return "TmapCube.jar"; else if (applet == APPLET_ANVOXEL) return "voxel.jar"; else if (applet == APPLET_TUNNEL3D) return "tunnel3d.jar"; else if (applet == APPLET_ANWATER) return "AnWater.jar"; else if (applet == APPLET_WARP ) return "Warp.jar"; else if (applet == APPLET_WORMHOLE) return "wormhole.jar"; else if (applet == APPLET_GALAXY) return "galaxy.jar"; else if (applet == APPLET_BOOKFLIP) return "bookflip.jar"; else if (applet == APPLET_MOSAIC) return "mosaic.jar"; else if (applet == APPLET_ANFY3D) return "anfy3d.jar"; else if (applet == APPLET_WHEEL) return "wheelmenu.jar"; else if (applet == APPLET_MORPHMENU) return "morphmenu.jar"; else if (applet == APPLET_WOBBLER) return "wobbler.jar"; else if (applet == APPLET_TSCROLLER) return "txtscroll.jar"; else if (applet == APPLET_TREEMENU) return "treemenu.jar"; else if (applet == APPLET_ANFYCAM) return "anfycam.jar"; else if (applet == APPLET_ANFYPAINT) return "anfypaint.jar"; else if (applet == APPLET_SOLIDSCROLLER) return "solidscr.jar"; else if (applet == APPLET_ANFYSNOW) return "ansnow.jar"; else if (applet == APPLET_FIREWORKS) return "firewks.jar"; else return NULL;}void GetAppletPath (int applet, char* dir){ strcpy (dir, g_strAppPath); strcat (dir, "/"); strcat (dir, g_strAppletDir); strcat (dir, "/"); switch (applet) { case APPLET_ANBLUR: strcat (dir, "blur"); break; case APPLET_ANFYBUMP: strcat (dir, "bump"); break; case APPLET_ANFADE: strcat (dir, "cfade"); break; case APPLET_ANFLAG: strcat (dir, "flag"); break; case APPLET_ANFRACT: strcat (dir, "ifsfract"); break; case APPLET_ANLAKE: strcat (dir, "lake"); break; case APPLET_ANLENS: strcat (dir, "lens"); break; case APPLET_MANDEL: strcat (dir, "mandel2"); break; case APPLET_ROTATE: strcat (dir, "rot"); break; case APPLET_ANTUNNEL: strcat (dir, "tunnel"); break; case APPLET_ANVOXEL: strcat (dir, "voxel"); break; case APPLET_ANWATER: strcat (dir, "water"); break; case APPLET_BLOBS: strcat (dir, "blobs"); break; case APPLET_CUBEMENU: strcat (dir, "cubemenu"); break; case APPLET_DEFORM : strcat (dir, "deform"); break; case APPLET_FIRE : strcat (dir, "fire"); break; case APPLET_FLAGLOAD: strcat (dir, "flagload"); break; case APPLET_FLOZOIDS: strcat (dir, "flozoids"); break; case APPLET_FLUID : strcat (dir, "fluid"); break; case APPLET_HUEROT : strcat (dir, "huerot"); break; case APPLET_LIFE2D : strcat (dir, "life2d"); break; case APPLET_PLASMA : strcat (dir, "plasma"); break; case APPLET_TMAPCUBE: strcat (dir, "tmapcube"); break; case APPLET_TUNNEL3D: strcat (dir, "tunnel3d"); break; case APPLET_WARP : strcat (dir, "warp"); break; case APPLET_WORMHOLE: strcat (dir, "wormhole"); break; case APPLET_GALAXY: strcat (dir, "galaxy"); break; case APPLET_BOOKFLIP: strcat (dir, "bookflip"); break; case APPLET_MOSAIC: strcat (dir, "mosaic"); break; case APPLET_ANFY3D: strcat (dir, "anfy3d"); break; case APPLET_WHEEL: strcat (dir, "wheelmenu"); break; case APPLET_MORPHMENU: strcat (dir, "morphmenu"); break; case APPLET_WOBBLER: strcat (dir, "wobbler"); break; case APPLET_TSCROLLER: strcat (dir, "txtscroll"); break; case APPLET_TREEMENU: strcat (dir, "treemenu"); break; case APPLET_ANFYCAM: strcat (dir, "anfycam"); break; case APPLET_ANFYPAINT: strcat (dir, "anfypaint"); break; case APPLET_SOLIDSCROLLER: strcat (dir, "solidscr"); break; case APPLET_ANFYSNOW: strcat (dir, "ansnow"); break; case APPLET_FIREWORKS: strcat (dir, "firewks"); break; default: strcat (dir, applet_info[applet].name); }}const char* GetDemoFile (int applet){ switch (applet) { case APPLET_ANBLUR: return "anblur.html"; case APPLET_ANFYBUMP: return "anfybump.html"; case APPLET_ANFADE: return "anfade.html"; case APPLET_ANFLAG: return "anflag.html"; case APPLET_ANFRACT: return "anfract.html"; case APPLET_ANLAKE: return "anlake.html"; case APPLET_ANLENS: return "anlens.html"; case APPLET_BLOBS: return "blobs.html"; case APPLET_CUBEMENU: return "cubemenu.html"; case APPLET_DEFORM: return "deform.html"; case APPLET_FIRE: return "fire.html"; case APPLET_FLAGLOAD: return "flagload.html"; case APPLET_FLOZOIDS: return "flozoids.html"; case APPLET_FLUID: return "fluid.html"; case APPLET_HUEROT: return "huerot.html"; case APPLET_MANDEL: return "mandel.html"; case APPLET_LIFE2D: return "life2d.html"; case APPLET_ROTATE: return "rota.html"; case APPLET_PLASMA: return "plasma.html"; case APPLET_ANTUNNEL: return "antunnel.html"; case APPLET_TMAPCUBE: return "tmapcube.html"; case APPLET_ANVOXEL: return "anvoxel.html"; case APPLET_TUNNEL3D: return "tunnel3d.html"; case APPLET_ANWATER: return "anwater.html"; case APPLET_WARP: return "warp.html"; case APPLET_WORMHOLE: return "wormhole.html"; case APPLET_GALAXY: return "galaxy.html"; case APPLET_BOOKFLIP: return "bookflip.html"; case APPLET_MOSAIC: return "mosaic.html"; case APPLET_ANFY3D: return "anfy3d.html"; case APPLET_WHEEL: return "wheelmenu.html"; case APPLET_MORPHMENU: return "morphmenu.html"; case APPLET_WOBBLER: return "wobbler.html"; case APPLET_TSCROLLER: return "txtscroll.html"; case APPLET_TREEMENU: return "treemenu.html"; case APPLET_ANFYCAM: return "anfycam.html"; case APPLET_ANFYPAINT: return "anfypaint.html"; case APPLET_SOLIDSCROLLER: return "solidscr.html"; case APPLET_ANFYSNOW: return "ansnow.html"; case APPLET_FIREWORKS: return "firewks.html"; default: return applet_info[applet].name; }}int ReadWriteFileScrollText (int applet, char* pScrollText, int mode){ int bRet = 1; char strAppletDir[1024]; FILE* f; int len; GetAppletPath (applet, strAppletDir); strcat (strAppletDir, "/"); strcat (strAppletDir, GetScrollTextFile(applet)); if (mode == 0) { f = fopen (strAppletDir, "rb"); if (f == NULL) { bRet = 0; message_box(_("Error reading textscroll file"), 0); } else { fseek (f, 0, SEEK_END); len = ftell (f); rewind (f); if (len > MAX_SCROLLTEXT_SIZE) len = MAX_SCROLLTEXT_SIZE; len = fread (pScrollText, 1, len, f); pScrollText[len]='\0'; fclose (f); } } else { f = fopen (strAppletDir, "wb"); if (f == NULL) { bRet = 0; message_box (_("Error writing textscroll file"), 0); } else { len = strlen (pScrollText); fwrite (pScrollText, 1, len, f); fclose (f); } } return bRet;}int ShowHelp (char* szTopic){ char strFile[1024]; strcpy (strFile, g_strAppPath); strcat (strFile, "/"); if (strcmp (szTopic, TOPIC_REG_HELP) == 0) { strcat (strFile, g_strHelpDir); strcat (strFile, "/registration.html"); return StartBrowser (strFile); } else if (strcmp (szTopic, TOPIC_SCRTEXT_HELP) == 0) { strcat (strFile, g_strAppletDir); strcat (strFile, "/scrtext.txt"); } else if (strcmp (szTopic, TOPIC_TECHFAQ) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, "/generalfaq.html"); return StartBrowser(strFile); } else if (strcmp (szTopic, TOPIC_COPYRIGHT_HELP) == 0 ) { strcat (strFile, g_strAppletDir); strcat (strFile, "/copyright.txt"); } else if (strcmp (szTopic, TOPIC_INSTRUCTION) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, HTML_HELP_ROOT); return StartBrowser(strFile); } else if (strcmp (szTopic, applet_info[APPLET_ANBLUR].name) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, "/blur.html"); return StartBrowser(strFile); } else if (strcmp (szTopic, applet_info[APPLET_ANFYBUMP].name ) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, "/bump.html"); return StartBrowser(strFile); } else if (strcmp (szTopic, applet_info[APPLET_ANFADE].name ) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, "/cfade.html"); return StartBrowser(strFile); } else if (strcmp (szTopic, applet_info[APPLET_ANFLAG].name ) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, "/flag.html"); return StartBrowser(strFile); } else if (strcmp (szTopic, applet_info[APPLET_ANFRACT].name ) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, "/ifsfract.html"); return StartBrowser(strFile); } else if (strcmp (szTopic, applet_info[APPLET_ANLAKE].name ) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, "/lake.html"); return StartBrowser(strFile); } else if (strcmp (szTopic, applet_info[APPLET_ANLENS].name ) == 0 ) { strcat (strFile, g_strHelpDir); strcat (strFile, "/lens.html"); return StartBrowser(strFile); } else if (strcmp (szTopic, applet_info[APPLET_BLOBS].name ) == 0 )
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?