39 preInitialized = 1; 40 } 41 return &splash; 42 } 43 44 SPLASHEXPORT void 45 SplashSetFileJarName(const char* fileName, const char* jarName) { 46 Splash *splash = SplashGetInstance(); 47 48 free(splash->fileName); 49 splash->fileName = SplashConvertStringAlloc(fileName, &splash->fileNameLen); 50 51 free(splash->jarName); 52 splash->jarName = SplashConvertStringAlloc(jarName, &splash->jarNameLen); 53 } 54 55 SPLASHEXPORT void 56 SplashInit() 57 { 58 Splash *splash = SplashGetInstance(); 59 60 memset(splash, 0, sizeof(Splash)); 61 splash->currentFrame = -1; 62 splash->scaleFactor = 1; 63 initFormat(&splash->imageFormat, QUAD_RED_MASK, QUAD_GREEN_MASK, 64 QUAD_BLUE_MASK, QUAD_ALPHA_MASK); 65 SplashInitPlatform(splash); 66 } 67 68 SPLASHEXPORT void 69 SplashClose() 70 { 71 Splash *splash = SplashGetInstance(); 72 73 if (splash->isVisible > 0) { 74 SplashLock(splash); 75 splash->isVisible = -1; 76 SplashClosePlatform(splash); 77 SplashUnlock(splash); 78 } 79 } 80 81 void 82 SplashCleanup(Splash * splash) | 39 preInitialized = 1; 40 } 41 return &splash; 42 } 43 44 SPLASHEXPORT void 45 SplashSetFileJarName(const char* fileName, const char* jarName) { 46 Splash *splash = SplashGetInstance(); 47 48 free(splash->fileName); 49 splash->fileName = SplashConvertStringAlloc(fileName, &splash->fileNameLen); 50 51 free(splash->jarName); 52 splash->jarName = SplashConvertStringAlloc(jarName, &splash->jarNameLen); 53 } 54 55 SPLASHEXPORT void 56 SplashInit() 57 { 58 Splash *splash = SplashGetInstance(); 59 float scaleFactor = splash->scaleFactor; 60 memset(splash, 0, sizeof(Splash)); 61 splash->currentFrame = -1; 62 splash->scaleFactor = scaleFactor; 63 initFormat(&splash->imageFormat, QUAD_RED_MASK, QUAD_GREEN_MASK, 64 QUAD_BLUE_MASK, QUAD_ALPHA_MASK); 65 SplashInitPlatform(splash); 66 } 67 68 SPLASHEXPORT void 69 SplashClose() 70 { 71 Splash *splash = SplashGetInstance(); 72 73 if (splash->isVisible > 0) { 74 SplashLock(splash); 75 splash->isVisible = -1; 76 SplashClosePlatform(splash); 77 SplashUnlock(splash); 78 } 79 } 80 81 void 82 SplashCleanup(Splash * splash) |