312 |
312 |
313 QStringList HWGame::getArguments() |
313 QStringList HWGame::getArguments() |
314 { |
314 { |
315 QStringList arguments; |
315 QStringList arguments; |
316 QRect resolution = config->vid_Resolution(); |
316 QRect resolution = config->vid_Resolution(); |
|
317 QString nick = config->netNick().toUtf8().toBase64(); |
|
318 |
|
319 arguments << "--internal"; //Must be passed as first argument |
|
320 arguments << "--port"; |
|
321 arguments << QString("%1").arg(ipc_port); |
|
322 arguments << "--prefix"; |
|
323 arguments << datadir->absolutePath(); |
|
324 arguments << "--user-prefix"; |
317 arguments << cfgdir->absolutePath(); |
325 arguments << cfgdir->absolutePath(); |
|
326 arguments << "--locale"; |
|
327 arguments << tr("en.txt"); |
|
328 arguments << "--frame-interval"; |
|
329 arguments << QString::number(config->timerInterval()); |
|
330 arguments << "--volume"; |
|
331 arguments << QString::number(config->volume()); |
|
332 arguments << "--width"; |
318 arguments << QString::number(resolution.width()); |
333 arguments << QString::number(resolution.width()); |
|
334 arguments << "--height"; |
319 arguments << QString::number(resolution.height()); |
335 arguments << QString::number(resolution.height()); |
320 arguments << QString::number(config->bitDepth()); // bpp |
336 arguments << "--raw-quality"; |
321 arguments << QString("%1").arg(ipc_port); |
|
322 arguments << (config->vid_Fullscreen() ? "1" : "0"); |
|
323 arguments << (config->isSoundEnabled() ? "1" : "0"); |
|
324 arguments << (config->isMusicEnabled() ? "1" : "0"); |
|
325 arguments << QString::number(config->volume()); // sound volume |
|
326 arguments << QString::number(config->timerInterval()); |
|
327 arguments << datadir->absolutePath(); |
|
328 arguments << (config->isShowFPSEnabled() ? "1" : "0"); |
|
329 arguments << (config->isAltDamageEnabled() ? "1" : "0"); |
|
330 arguments << config->netNick().toUtf8().toBase64(); |
|
331 arguments << QString::number(config->translateQuality()); |
337 arguments << QString::number(config->translateQuality()); |
|
338 arguments << "--stereo"; |
332 arguments << QString::number(config->stereoMode()); |
339 arguments << QString::number(config->stereoMode()); |
333 arguments << tr("en.txt"); |
340 if (config->vid_Fullscreen()) |
|
341 arguments << "--fullscreen"; |
|
342 if (config->isShowFPSEnabled()) |
|
343 arguments << "--showfps"; |
|
344 if (config->isAltDamageEnabled()) |
|
345 arguments << "--altdmg"; |
|
346 if (!config->isSoundEnabled()) |
|
347 arguments << "--nosound"; |
|
348 if (!config->isMusicEnabled()) |
|
349 arguments << "--nomusic"; |
|
350 if (!nick.isEmpty()) { |
|
351 arguments << "--nick"; |
|
352 arguments << nick; |
|
353 } |
334 |
354 |
335 return arguments; |
355 return arguments; |
336 } |
356 } |
337 |
357 |
338 void HWGame::PlayDemo(const QString & demofilename, bool isSave) |
358 void HWGame::PlayDemo(const QString & demofilename, bool isSave) |