Пример #1
0
void GameUI::nodeChanged(MythGenericTree* node)
{
    if (!node)
        return;

    if (!isLeaf(node))
    {
        if (node->childCount() == 0 || node == m_favouriteNode)
        {
            node->deleteAllChildren();
            fillNode(node);
        }
        clearRomInfo();
    }
    else
    {
        RomInfo *romInfo = qVariantValue<RomInfo *>(node->GetData());
        if (!romInfo)
            return;
        if (romInfo->Romname().isEmpty())
            romInfo->fillData();
        updateRomInfo(romInfo);
        if (!romInfo->Screenshot().isEmpty() || !romInfo->Fanart().isEmpty() ||
            !romInfo->Boxart().isEmpty())
            showImages();
        else
        {
            if (m_gameImage)
                m_gameImage->Reset();
            if (m_fanartImage)
                m_fanartImage->Reset();
            if (m_boxImage)
                m_boxImage->Reset();
        }
    }
}
Пример #2
0
unsigned char htmlgenWriteRom(RomInfo* rom)
{
	const char* fnOnly;
	unsigned char ALLIGNEDBY(16) buf[255] ;

	writeToLog("Generating HTML info for %s\n",rom->filename);

	if(!rom)
		return RST_FAILED;
	
	if(!rom->romData)
		return RST_FAILED;

	if(!out)
		return RST_FAILED;


	updateRomInfo(rom);

	buf[0]='\0';
	buf[254]='\0';

/* testing tables..
	htmlgenWriteBorderFrontPart();
 
	writeBorderCaption(extractFilename(rom->filename));
	writeBorderCaption(rom->system);
	writeBorderCaption(rom->copyright);
	writeBorderCaption(rom->domesticName);
	writeBorderCaption(rom->overseasName);
	writeBorderCaption(rom->productNo);

	
	htmlgenWriteBorderBottomPart();
 */

	//writeBorderCaption(rom->system);
	//writeBorderCaption(rom->system);

	outWriteCenterFrontPart();
	outWriteColorFrontPart("Red");
	outWriteSizeFrontPart("3");
	outWriteBoldFrontPart();
	fnOnly = extractFilename(rom->filename);

	//if((!fnOnly) || (fnOnly == (char*)1)) <- not needed anymore i wrapped strrchr 3/OCT/09
	//	fnOnly = rom->filename;

	outWritePG2("ROM Filename : ", fnOnly);
	outWriteBoldBottomPart();
	outWritePG2("System: ",rom->system);
	outWritePG2("Copyrights: ",rom->copyright);
	outWritePG2("Domestic name: ",rom->domesticName);
	outWritePG2("Overseas name: ",rom->overseasName);
	outWritePG2("Product No: ",rom->productNo);
	outWritePG2("Modem brand(if supported!): ",rom->modemBrand);
	outWritePG2("Modem version(if supported!): ",rom->modemVersion);
	outWritePG2("Controler data: ",rom->controlerData);
	outWritePG2("Memo: ",rom->memo);
	outWritePG2("Supported countries: ",rom->supportedCountries);
	sprintf(buf,"%03x",rom->checksum);
	buf[strlen(buf)]='\0';
	outWritePG2("Checksum: ",buf);buf[0]='\0';
	sprintf(buf,"%d",(rom->saveEndAddress-rom->saveStartAddress));
	buf[strlen(buf)]='\0';
	outWritePG2("Save alloc : ",buf);buf[0]='\0';
	sprintf(buf,"Supported IO DEVICE BITS (BITFLAGS) [JOY:%d ,JOY6:%d ,KEYBOARD:%d ,PRINTER:%d ,CONTROL BALL:%d ,FLOPPY DISK:%d",
			getBitFieldStatus(rom->IODeviceBits,JOYPAD),getBitFieldStatus(rom->IODeviceBits,JOYPAD_6BTN),
			getBitFieldStatus(rom->IODeviceBits,KEYBOARD),getBitFieldStatus(rom->IODeviceBits,PRINTER),
			getBitFieldStatus(rom->IODeviceBits,CONTROL_BALL),getBitFieldStatus(rom->IODeviceBits,FLOPPY_DISK)
		);

	buf[strlen(buf)]='\0';
	outWritePG1(buf);buf[0]='\0';


	sprintf(buf,"ACTIVATOR: %d , TEAMPLAY: %d , JOYSTIC MS: %d ,RS232C:%d , TABLET:%d , PADDLE_CONTROLLER:%d, CDROM:%d , MOUSE:%d]\n",
			getBitFieldStatus(rom->IODeviceBits,ACTIVATOR),getBitFieldStatus(rom->IODeviceBits,TEAMPLAY),
			getBitFieldStatus(rom->IODeviceBits,JOYSTIC_MS),getBitFieldStatus(rom->IODeviceBits,RS232C),
			getBitFieldStatus(rom->IODeviceBits,TABLET),getBitFieldStatus(rom->IODeviceBits,PADDLE_CONTROLLER),
			getBitFieldStatus(rom->IODeviceBits,CDROM),getBitFieldStatus(rom->IODeviceBits,MEGA_MOUSE)
		);

	buf[strlen(buf)]='\0';
	outWritePG1(buf);buf[0]='\0';

	outWriteFontSizeBottomPart();
	outWriteColorBottomPart();
	outWriteCenterBottomPart();

	outWriteNextLine();
	outWriteNextLine();

	return RST_SUCCESS;
}