14 TYPE_FolderEntry FolderEntry;
16 byte *PixelData, *TempBuffer;
37 NrFiles = TAP_Hdd_FindFirst(&FolderEntry,
"qtl|qsl|ibl");
38 for(k = 0; k < NrFiles; k++)
40 if(FolderEntry.attr == ATTR_NORMAL)
45 TAP_Hdd_FindNext(&FolderEntry);
68 TAP_Hdd_Fwrite(ID, 4, 1, f);
69 TAP_Hdd_Fwrite(&Version,
sizeof(dword), 1, f);
81 NrFiles = TAP_Hdd_FindFirst(&FolderEntry,
"qtl|qsl|ibl");
82 for(k = 0; k < NrFiles; k++)
86 if(FolderEntry.attr == ATTR_NORMAL)
101 fLogo = TAP_Hdd_Fopen(FolderEntry.name);
106 TempBuffer = TAP_MemAlloc(
sizeof(TYPE_GrData) +
BufferSize);
107 if(PixelData && TempBuffer)
109 TAP_Hdd_Fread(PixelData,
BufferSize + 8, 1, fLogo);
110 CompressedSize =
CompressTFD(&PixelData[8],
BufferSize, &TempBuffer[
sizeof(TYPE_GrData)], 0x0001, 0xffff, NULL);
111 TAP_Put16bit(&TempBuffer[
sizeof(TYPE_GrData) + 0x0e], 0xffff);
113 grData = (TYPE_GrData*)TempBuffer;
115 grData->reserved = 0;
116 grData->dataFormat = OSD_1555;
117 grData->compessMethod = COMPRESS_Tfp;
120 grData->width = TAP_Get32bit(&PixelData[0]);
121 grData->height = TAP_Get32bit(&PixelData[4]);
128 if(PixelData) TAP_MemFree(PixelData);
129 if(TempBuffer) TAP_MemFree(TempBuffer);
130 TAP_Hdd_Fclose(fLogo);
138 TAP_Hdd_FindNext(&FolderEntry);
147 TAP_Hdd_Fseek(f,
sizeof(ID) +
sizeof(dword) +
sizeof(dword),
SEEK_SET);
dword CompressTFD(byte *pSrc, dword SourceBufferSize, byte *pDest, word TFDType, word SysID, void *pPercentFinishedCallback)
tLogoData * LogoManager_LogoData
void(* LogoManager_CB)(int CallbackType, int Param1)
bool FixInvalidFileName(char *FileName)
bool HDD_ChangeDir(const char *Dir)
void LogoManager_LogoCacheRebuild(void)
bool HDD_TAP_PushDir(void)
char * LogoManager_GetDirectory(tLogoStyle LogoStyle, tLogoAspect LogoAR, char *LogoPath)
bool HDD_TAP_PopDir(void)
bool StringEndsWith(const char *text, const char *postfix)
char LogoName[MAXLOGONAME+1]