InputMap::InputMap(QObject*parent, t_input_universe universes) : QObject(parent) { m_universes = universes; m_editorUniverse = 0; initPatch(); }
InputMap::InputMap(QObject*parent, t_input_universe universes) : QObject(parent) { m_universes = universes; m_editorUniverse = 0; initPatch(); loadPlugins(); #ifdef Q_WS_X11 /* First, load user profiles (overrides system profiles) */ QDir dir(QString(getenv("HOME"))); loadProfiles(dir.absoluteFilePath(QString(USERINPUTPROFILEDIR))); #endif /* Then, load system profiles */ #ifdef __APPLE__ loadProfiles(QString("%1/%2") .arg(QApplication::applicationDirPath()) .arg(INPUTPROFILEDIR)); #else loadProfiles(INPUTPROFILEDIR); #endif loadDefaults(); }
InputMap::InputMap(Doc* doc, quint32 universes) : QObject(doc) , m_universes(universes) , m_editorUniverse(0) { initPatch(); connect(doc->ioPluginCache(), SIGNAL(pluginConfigurationChanged(QLCIOPlugin*)), this, SLOT(slotPluginConfigurationChanged(QLCIOPlugin*))); }
OutputMap::OutputMap(QObject* parent, quint32 universes) : QObject(parent) { m_universes = universes; m_blackout = false; m_universeChanged = false; m_universeArray = new UniverseArray(512 * universes); initPatch(); }
OutputMap::OutputMap(QObject* parent, int universes) : QObject(parent) { m_universes = universes; m_dummyOut = NULL; m_blackout = false; m_universeChanged = false; m_universeArray = new QByteArray(512 * universes, 0); initPatch(); }
OutputMap::OutputMap(Doc* doc, quint32 universes) : QObject(doc) , m_universes(universes) , m_blackout(false) , m_universeArray(new UniverseArray(512 * universes)) , m_universeChanged(false) { initPatch(); connect(doc->ioPluginCache(), SIGNAL(pluginConfigurationChanged(QLCIOPlugin*)), this, SLOT(slotPluginConfigurationChanged(QLCIOPlugin*))); }
OutputMap::OutputMap(QObject* parent, int universes) : QObject(parent) { m_universes = universes; m_dummyOut = NULL; m_blackout = false; m_universeArray = new QByteArray(universes * 512, 0); initPatch(); load(); loadDefaults(); }
//----------------------------------------------------------------------- HRESULT CEnvironmentMap::initScene() { deviceRestore(); initPatch("AnimationObj", 20); createVertexBuff(); if (FAILED(D3DXCreateTextureFromFile(mD3DDevice, L"..\\..\\Media\\she says.jpg", &mTextureShesays))) return E_FAIL; mD3DDevice->SetTexture(1, mTextureShesays); return S_OK; }
bool PatchUsingIPS(const char *ext) { unsigned char *ROM = (unsigned char *)romdata; int location = 0, length = 0, last = 0; int sub = Header512 ? 512 : 0; if (!AutoPatch) { deinitPatch(); //Needed if the call to this function was done from findZipIPS() return(false); } if (!IPSPatch.zipfile) //Regular file, not Zip { if (!initPatch(ext)) { deinitPatch(); //Needed because if it didn't fully init, some things could have return(false); } } //Yup, it's goto! :) //See 'IPSDone:' for explanation if (IPSget() != 'P') { goto IPSDone; } if (IPSget() != 'A') { goto IPSDone; } if (IPSget() != 'T') { goto IPSDone; } if (IPSget() != 'C') { goto IPSDone; } if (IPSget() != 'H') { goto IPSDone; } while (IPSPatch.proccessed != IPSPatch.file_size) { //Location is a 3 byte value (max 16MB) int inloc = (IPSget() << 16) | (IPSget() << 8) | IPSget(); if (inloc == 0x454f46) //EOF { break; } //Offset by size of ROM header location = inloc - sub; //Length is a 2 byte value (max 64KB) length = (IPSget() << 8) | IPSget(); if (length) // Not RLE { int i; for (i = 0; i < length; i++, location++) { if (location >= 0) { if (location >= maxromspace) { goto IPSDone; } ROM[location] = (unsigned char)IPSget(); if (location > last) { last = location; } } else { IPSget(); //Need to skip the bytes that write to header } } } else //RLE { int i; unsigned char newVal; length = (IPSget() << 8) | IPSget(); newVal = (unsigned char)IPSget(); for (i = 0; i < length; i++, location++) { if (location >= 0) { if (location >= maxromspace) { goto IPSDone; } ROM[location] = newVal; if (location > last) { last = location; } } } } } //We use gotos to break out of the nested loops, //as well as a simple way to check for 'PATCH' in //some cases like this one, goto is the way to go. IPSDone: deinitPatch(); IPSPatched = true; //Adjust size values if the ROM was expanded if (last >= curromspace) { NumofBytes = curromspace = last+1; NumofBanks = NumofBytes/32768; } /* //Write out patched ROM { FILE *fp = 0; fp = fopen_dir(ZCfgPath, "zsnes.rom", "wb"); if (!fp) { perror("zsnes.rom"); __asm__ volatile("int $3"); } fwrite(ROM, 1, curromspace, fp); fclose(fp); } */ return(true); }