Skip to content

Commit dcf19c6

Browse files
committed
Added code files for initial commit.
HASHTAG YOLO SWAG
1 parent 75ae71d commit dcf19c6

11 files changed

+712
-3
lines changed

README.md

+44-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,45 @@
1-
launch
2-
======
1+
THE AS OF YET NOT OFFICIALLY NAMED LAUNCHER FOR IOQ3
2+
====================================================
33

4-
The launcher for ioquake3.
4+
The launcher for ioquake3. Built with QT, written in C++
5+
6+
ROADMAP
7+
=======
8+
9+
Required features to reach:
10+
---------------------------
11+
12+
Version 1.0(alpha)
13+
14+
launch the ioquake3 program - DONE
15+
launch quake3 at different resolutions - DONE
16+
download/install patches for quake3 - not yet implemented
17+
display EULA before downloading q3 patches - not yet implemented
18+
19+
20+
2.0(beta)
21+
22+
be able to download/install ioquake3
23+
be able to copy quake3 data from retail CD
24+
be able to update ioquake3
25+
be able to update self
26+
initial support for other operating systems - STARTED(Linux)
27+
28+
3.0(Gold)
29+
30+
config launch options
31+
config player options
32+
WYSIWYG name config
33+
work with steam installation of quake3
34+
backup/save/swap configs
35+
support for Linux, Windows, and OSX
36+
37+
4.0(PLATINUM)
38+
39+
support for other games (Tremulous/SmokinGuns/TurtleArena/etc.)
40+
automated mod switcher
41+
builtin server browser
42+
integrated newsfeed
43+
LAN support
44+
preload mods/maps/content via internet protocols
45+
uri integration (q3://, trem://, ioq3://, etc.)

imgs.qrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<RCC>
2+
<qresource prefix="/imgs">
3+
<file>ioquaktree.png</file>
4+
<file>iol.png</file>
5+
<file>iolICO.png</file>
6+
</qresource>
7+
</RCC>

iol.png

6.62 KB
Loading

iolICO.png

1.36 KB
Loading

ioq3.png

5.44 KB
Loading

ioq3ICO.png

1.18 KB
Loading

ioquaktree.png

3.96 KB
Loading

main.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <QtGui/QApplication>
2+
#include "mainwindow.h"
3+
4+
int main(int argc, char *argv[])
5+
{
6+
QApplication a(argc, argv);
7+
ioLaunch w;
8+
w.show();
9+
10+
return a.exec();
11+
}

mainwindow.cpp

+218
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
#include "mainwindow.h"
2+
#include "ui_mainwindow.h"
3+
4+
ioLaunch::ioLaunch(QWidget *parent) :
5+
QMainWindow(parent),
6+
ui(new Ui::ioLaunch)
7+
{
8+
ui->setupUi(this);
9+
resOption = "";
10+
screenOption = "";
11+
12+
}
13+
14+
ioLaunch::~ioLaunch()
15+
{
16+
delete ui;
17+
}
18+
19+
void ioLaunch::on_btnLaunch_clicked()
20+
{
21+
#ifdef Q_OS_WIN32
22+
if(ioq3 == NULL)
23+
{
24+
msg.setText("Please select your Quake3 directory");
25+
msg.exec();
26+
QString path = QFileDialog::getExistingDirectory (this, tr("Directory"), directory.path());
27+
path.replace(" ", "\" \"");
28+
ioq3 = path + "\\ioquake3.x86.exe +set r_mode -1";
29+
}
30+
31+
#elif Q_OS_X11
32+
ioq3 = "ioquake3 +set r_mode -1";
33+
#elif Q_OS_MAC
34+
ioq3 = "open -a ioquake3 +set r_mode -1";
35+
#endif
36+
37+
38+
if(ioWedited == true && ioHedited == true)
39+
{
40+
41+
resOption = " +set r_customwidth " + QString::number(ioWidth) + " +set r_customheight " + QString::number(ioHeight);
42+
43+
}
44+
if(resOption == NULL)
45+
{
46+
resOption = "";
47+
}
48+
if(screenOption == NULL)
49+
{
50+
screenOption = "";
51+
}
52+
53+
myProcess.start(ioq3+resOption+screenOption);
54+
if(!myProcess.waitForStarted())
55+
{
56+
ioq3Failed.setText("ioquake3 failed to start!\nIs it installed?\n");
57+
ioq3Failed.exec();
58+
}
59+
}
60+
61+
void ioLaunch::on_cbResolution_highlighted(int index)
62+
{
63+
ioWedited = false;
64+
ioHedited = false;
65+
}
66+
67+
void ioLaunch::on_cbResolution_currentIndexChanged(int index)
68+
{
69+
ioWedited = false;
70+
ioHedited = false;
71+
switch(index)
72+
{
73+
case 0:
74+
{
75+
resOption = "";
76+
break;
77+
}
78+
case 1:
79+
{
80+
ioWidth = QApplication::desktop()->screenGeometry().width();
81+
ioHeight = QApplication::desktop()->screenGeometry().height();
82+
83+
resOption = " +set r_customwidth " + QString::number(ioWidth) + " +set r_customheight " + QString::number(ioHeight);
84+
break;
85+
}
86+
case 2:
87+
{
88+
resOption = " +set r_customwidth 320 +set r_customheight 240";
89+
break;
90+
}
91+
case 3:
92+
{
93+
resOption = " +set r_customwidth 400 +set r_customheight 300";
94+
break;
95+
}
96+
case 4:
97+
{
98+
resOption = " +set r_customwidth 512 +set r_customheight 384";
99+
break;
100+
}
101+
case 5:
102+
{
103+
resOption = " +set r_customwidth 640 +set r_customheight 480";
104+
break;
105+
}
106+
case 6:
107+
{
108+
resOption = " +set r_customwidth 800 +set r_customheight 600";
109+
break;
110+
}
111+
case 7:
112+
{
113+
resOption = " +set r_customwidth 960 +set r_customheight 720";
114+
break;
115+
}
116+
case 8:
117+
{
118+
resOption = " +set r_customwidth 1024 +set r_customheight 3768";
119+
break;
120+
}
121+
case 9:
122+
{
123+
resOption = " +set r_customwidth 1152 +set r_customheight 864";
124+
break;
125+
}
126+
case 10:
127+
{
128+
resOption = " +set r_customwidth 1280 +set r_customheight 1024";
129+
break;
130+
}
131+
case 11:
132+
{
133+
resOption = " +set r_customwidth 1600 +set r_customheight 1200";
134+
break;
135+
}
136+
case 12:
137+
{
138+
resOption = " +set r_customwidth 2048 +set r_customheight 1536";
139+
break;
140+
}
141+
case 13:
142+
{
143+
resOption = " +set r_customwidth 856 +set r_customheight 480";
144+
break;
145+
}
146+
case 14:
147+
{
148+
resOption = " +set r_customwidth 1280 +set r_customheight 720";
149+
break;
150+
}
151+
case 15:
152+
{
153+
resOption = " +set r_customwidth 1920 +set r_customheight 1080";
154+
break;
155+
}
156+
case 16:
157+
{
158+
resOption = " +set r_customwidth 1280 +set r_customheight 800";
159+
break;
160+
}
161+
default:
162+
{
163+
resOption = "";
164+
break;
165+
}
166+
}
167+
}
168+
169+
void ioLaunch::on_rbFull_toggled(bool checked)
170+
{
171+
if(checked)
172+
{
173+
screenOption = " +set r_fullscreen 1";
174+
}
175+
}
176+
177+
void ioLaunch::on_rbWin_toggled(bool checked)
178+
{
179+
if(checked)
180+
{
181+
screenOption = " +set r_fullscreen 0";
182+
}
183+
}
184+
185+
void ioLaunch::on_rbDefault_toggled(bool checked)
186+
{
187+
if(checked)
188+
{
189+
screenOption = "";
190+
}
191+
}
192+
193+
194+
void ioLaunch::on_sbWidth_valueChanged(int arg1)
195+
{
196+
ioWidth = 0;
197+
if(arg1 >= 0)
198+
{
199+
ioWidth = arg1;
200+
ioWedited = true;
201+
}
202+
else{
203+
ioWedited = false;
204+
}
205+
}
206+
207+
void ioLaunch::on_sbHeight_valueChanged(int arg1)
208+
{
209+
ioHeight = 0;
210+
if(arg1 >= 0)
211+
{
212+
ioHeight = arg1;
213+
ioHedited = true;
214+
}
215+
else{
216+
ioHedited = false;
217+
}
218+
}

mainwindow.h

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#ifndef MAINWINDOW_H
2+
#define MAINWINDOW_H
3+
4+
#include <QMainWindow>
5+
#include <QDesktopWidget>
6+
#include <QMessageBox>
7+
#include <QProcess>
8+
#include <QString>
9+
#include <QtGlobal>
10+
#include <QFileDialog>
11+
#include <QDir>
12+
13+
namespace Ui {
14+
class ioLaunch;
15+
}
16+
17+
class ioLaunch : public QMainWindow
18+
{
19+
Q_OBJECT
20+
21+
public:
22+
explicit ioLaunch(QWidget *parent = 0);
23+
~ioLaunch();
24+
25+
private slots:
26+
void on_btnLaunch_clicked();
27+
28+
29+
void on_cbResolution_highlighted(int index);
30+
31+
void on_cbResolution_currentIndexChanged(int index);
32+
33+
void on_rbFull_toggled(bool checked);
34+
35+
void on_rbWin_toggled(bool checked);
36+
37+
void on_rbDefault_toggled(bool checked);
38+
39+
void on_sbWidth_valueChanged(int arg1);
40+
41+
void on_sbHeight_valueChanged(int arg1);
42+
43+
private:
44+
Ui::ioLaunch *ui;
45+
QProcess myProcess;
46+
QString ioq3;
47+
QString resOption;
48+
QString screenOption;
49+
QMessageBox msg;
50+
QMessageBox ioq3Failed;
51+
QDir directory;
52+
int ioWidth;
53+
int ioHeight;
54+
bool ioWedited;
55+
bool ioHedited;
56+
57+
};
58+
59+
#endif // MAINWINDOW_H

0 commit comments

Comments
 (0)