diff --git a/CONFIG/MainDlg.cpp b/CONFIG/MainDlg.cpp
index 828395bd..89c72161 100644
--- a/CONFIG/MainDlg.cpp
+++ b/CONFIG/MainDlg.cpp
@@ -57,8 +57,9 @@ CMainDialog::CMainDialog(QWidget* pParent) : QDialog(pParent)
connect(m_ui->devicesList, &QListWidget::currentRowChanged, this, &CMainDialog::OnList3DevicesSelectionChanged);
connect(m_ui->musicCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxMusic);
connect(m_ui->sound3DCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckbox3DSound);
- connect(m_ui->joystickCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxJoystick);
connect(m_ui->fullscreenCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxFullscreen);
+ connect(m_ui->rumbleCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxRumble);
+ connect(m_ui->touchComboBox, &QComboBox::currentIndexChanged, this, &CMainDialog::TouchControlsChanged);
connect(m_ui->transitionTypeComboBox, &QComboBox::currentIndexChanged, this, &CMainDialog::TransitionTypeChanged);
connect(m_ui->okButton, &QPushButton::clicked, this, &CMainDialog::accept);
connect(m_ui->cancelButton, &QPushButton::clicked, this, &CMainDialog::reject);
@@ -210,9 +211,9 @@ void CMainDialog::UpdateInterface()
else {
m_ui->textureQualityHighRadioButton->setChecked(true);
}
- m_ui->joystickCheckBox->setChecked(currentConfigApp->m_use_joystick);
m_ui->musicCheckBox->setChecked(currentConfigApp->m_music);
m_ui->fullscreenCheckBox->setChecked(currentConfigApp->m_full_screen);
+ m_ui->rumbleCheckBox->setChecked(currentConfigApp->m_haptic);
m_ui->transitionTypeComboBox->setCurrentIndex(currentConfigApp->m_transition_type);
m_ui->dataPath->setText(QString::fromStdString(currentConfigApp->m_cd_path));
m_ui->savePath->setText(QString::fromStdString(currentConfigApp->m_save_path));
@@ -275,14 +276,6 @@ void CMainDialog::OnRadiobuttonTextureHighQuality(bool checked)
}
}
-// FUNCTION: CONFIG 0x00404790
-void CMainDialog::OnCheckboxJoystick(bool checked)
-{
- currentConfigApp->m_use_joystick = checked;
- m_modified = true;
- UpdateInterface();
-}
-
// FUNCTION: CONFIG 0x004048c0
void CMainDialog::OnCheckboxMusic(bool checked)
{
@@ -298,6 +291,20 @@ void CMainDialog::OnCheckboxFullscreen(bool checked)
UpdateInterface();
}
+void CMainDialog::OnCheckboxRumble(bool checked)
+{
+ currentConfigApp->m_haptic = checked;
+ m_modified = true;
+ UpdateInterface();
+}
+
+void CMainDialog::TouchControlsChanged(int index)
+{
+ currentConfigApp->m_touchScheme = index;
+ m_modified = true;
+ UpdateInterface();
+}
+
void CMainDialog::TransitionTypeChanged(int index)
{
currentConfigApp->m_transition_type = index;
diff --git a/CONFIG/MainDlg.h b/CONFIG/MainDlg.h
index 72062486..3a616607 100644
--- a/CONFIG/MainDlg.h
+++ b/CONFIG/MainDlg.h
@@ -40,9 +40,10 @@ private slots:
void OnRadiobuttonModelHighQuality(bool checked);
void OnRadiobuttonTextureLowQuality(bool checked);
void OnRadiobuttonTextureHighQuality(bool checked);
- void OnCheckboxJoystick(bool checked);
void OnCheckboxMusic(bool checked);
void OnCheckboxFullscreen(bool checked);
+ void OnCheckboxRumble(bool checked);
+ void TouchControlsChanged(int index);
void TransitionTypeChanged(int index);
void accept() override;
void reject() override;
diff --git a/CONFIG/config.cpp b/CONFIG/config.cpp
index b4435298..d063047f 100644
--- a/CONFIG/config.cpp
+++ b/CONFIG/config.cpp
@@ -78,6 +78,8 @@ bool CConfigApp::InitInstance()
m_3d_video_ram = FALSE;
m_joystick_index = -1;
m_display_bit_depth = 16;
+ m_haptic = TRUE;
+ m_touchScheme = 2;
int totalRamMiB = SDL_GetSystemRAM();
if (totalRamMiB < 12) {
m_3d_sound = FALSE;
@@ -155,6 +157,7 @@ bool CConfigApp::ReadRegisterSettings()
m_flip_surfaces = iniparser_getboolean(dict, "isle:Flip Surfaces", m_flip_surfaces);
m_full_screen = iniparser_getboolean(dict, "isle:Full Screen", m_full_screen);
m_transition_type = iniparser_getint(dict, "isle:Transition Type", m_transition_type);
+ m_touchScheme = iniparser_getint(dict, "isle:Touch Scheme", m_touchScheme);
m_3d_video_ram = iniparser_getboolean(dict, "isle:Back Buffers in Video RAM", m_3d_video_ram);
m_wide_view_angle = iniparser_getboolean(dict, "isle:Wide View Angle", m_wide_view_angle);
m_3d_sound = iniparser_getboolean(dict, "isle:3DSound", m_3d_sound);
@@ -162,6 +165,7 @@ bool CConfigApp::ReadRegisterSettings()
m_model_quality = iniparser_getint(dict, "isle:Island Quality", m_model_quality);
m_texture_quality = iniparser_getint(dict, "isle:Island Texture", m_texture_quality);
m_use_joystick = iniparser_getboolean(dict, "isle:UseJoystick", m_use_joystick);
+ m_haptic = iniparser_getboolean(dict, "isle:Haptic", m_haptic);
m_music = iniparser_getboolean(dict, "isle:Music", m_music);
m_joystick_index = iniparser_getint(dict, "isle:JoystickIndex", m_joystick_index);
m_max_lod = iniparser_getdouble(dict, "isle:Max LOD", m_max_lod);
@@ -230,6 +234,14 @@ bool CConfigApp::ValidateSettings()
m_max_actors = 20;
is_modified = TRUE;
}
+ if (!m_use_joystick) {
+ m_use_joystick = true;
+ is_modified = TRUE;
+ }
+ if (m_touchScheme < 0 || m_touchScheme > 2) {
+ m_touchScheme = 2;
+ is_modified = TRUE;
+ }
return is_modified;
}
@@ -311,9 +323,11 @@ void CConfigApp::WriteRegisterSettings() const
SetIniBool(dict, "isle:Wide View Angle", m_wide_view_angle);
SetIniInt(dict, "isle:Transition Type", m_transition_type);
+ SetIniInt(dict, "isle:Touch Scheme", m_touchScheme);
SetIniBool(dict, "isle:3DSound", m_3d_sound);
SetIniBool(dict, "isle:Music", m_music);
+ SetIniBool(dict, "isle:Haptic", m_haptic);
SetIniBool(dict, "isle:UseJoystick", m_use_joystick);
SetIniInt(dict, "isle:JoystickIndex", m_joystick_index);
diff --git a/CONFIG/config.h b/CONFIG/config.h
index dffc2b6c..cbdfec13 100644
--- a/CONFIG/config.h
+++ b/CONFIG/config.h
@@ -71,6 +71,7 @@ class CConfigApp {
bool m_3d_sound;
bool m_draw_cursor;
bool m_use_joystick;
+ bool m_haptic;
int m_joystick_index;
int m_model_quality;
int m_texture_quality;
@@ -81,6 +82,7 @@ class CConfigApp {
std::string m_save_path;
float m_max_lod;
int m_max_actors;
+ int m_touchScheme;
};
extern CConfigApp g_theApp;
diff --git a/CONFIG/res/maindialog.ui b/CONFIG/res/maindialog.ui
index 452ebdb3..0436ba1a 100644
--- a/CONFIG/res/maindialog.ui
+++ b/CONFIG/res/maindialog.ui
@@ -7,7 +7,7 @@
0
0
550
- 610
+ 620
@@ -23,7 +23,7 @@
:/lego1.png:/lego1.png
-
+
-
@@ -184,8 +184,8 @@
0
-
-
-
+
-
+
0
@@ -193,36 +193,65 @@
- Set 3D model detail level.
+ Maximum number of LEGO actors to exist in the world at a time. The game will gradually increase the number of actors until this maximum is reached and while performance is acceptable.
- Island Model Quality
+ Maximum Actors (5..40)
-
+
-
-
-
- Broken, not recommended.
+
+
+
+ 0
+ 0
+
-
- color: rgb(255, 0, 0);
+
+ 5
-
- Low - BROKEN!
+
+ 40
+
+
+ 5
+
+
+ 20
+
+
+ 20
+
+
+ false
+
+
+ Qt::Horizontal
+
+
+ QSlider::NoTicks
+
+
+ 5
-
-
-
- Medium
+
+
+
+ 0
+ 0
+
+
+
+
+ 15
+ 0
+
-
-
- -
-
- High
+ 20
@@ -284,11 +313,78 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 15
+ 0
+
+
+
+ 35
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Set 3D model detail level.
+
+
+ Island Model Quality
+
+
+
-
+
+
+ Broken, not recommended.
+
+
+ color: rgb(255, 0, 0);
+
+
+ Low - BROKEN!
+
+
+
+ -
+
+
+ Medium
+
+
+
+ -
+
+
+ High
+
+
+
-
+
+ true
+
0
@@ -301,6 +397,9 @@
Island Texture Quality
+
+ false
+
0
@@ -325,61 +424,6 @@
- -
-
-
-
- 0
- 0
-
-
-
- Maximum number of LEGO actors to exist in the world at a time. The game will gradually increase the number of actors until this maximum is reached and while performance is acceptable.
-
-
- Maximum Actors (5..40)
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- 5
-
-
- 40
-
-
- 5
-
-
- 20
-
-
- 20
-
-
- false
-
-
- Qt::Horizontal
-
-
- QSlider::NoTicks
-
-
- 5
-
-
-
-
-
-
@@ -392,9 +436,6 @@
-
- 10
-
0
@@ -421,16 +462,6 @@
- -
-
-
- Enable joystick and gamepad support for LEGO Island.
-
-
- Use Joystick
-
-
-
-
@@ -441,67 +472,132 @@
+ -
+
+
+ true
+
+
+ Enable controller rumble.
+
+
+ Rumble
+
+
+ true
+
+
+
-
-
-
-
- 0
- 0
-
-
-
- Sets the transition effect to be used in game.
-
-
- Transition Type
-
-
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
-
-
-
- Mosaic
+
+
+
+ 0
+ 0
+
-
- 3
+
+ Sets the transition effect to be used in game.
-
-
-
- Idle - Broken
-
-
- -
-
- No Animation
-
-
- -
-
- Dissolve
-
-
- -
-
- Mosaic
-
-
- -
-
- Wipe Down
-
-
- -
-
- Windows
-
-
- -
-
- Unknown - Broken
-
-
+
+ Transition Type
+
+
+ -
+
+
+ Mosaic
+
+
+ 3
+
+
-
+
+ Idle - Broken
+
+
+ -
+
+ No Animation
+
+
+ -
+
+ Dissolve
+
+
+ -
+
+ Mosaic
+
+
+ -
+
+ Wipe Down
+
+
+ -
+
+ Windows
+
+
+ -
+
+ Unknown - Broken
+
+
+
+
+
+
+
+ -
+
+
+ <html><head/><body><p><span style=" font-weight:600;">Virtual Gamepad (Recommended):</span> Slide your finger to move and turn.</p><p><span style=" font-weight:600;">Virtual Arrow Keys:</span> Tap screen areas to move. The top moves forward, the bottom turns or moves back.</p><p><span style=" font-weight:600;">Virtual Mouse:</span> Emulates classic mouse controls with touch.</p></body></html>
+
+
+ Touch Control Scheme
+
+
+
-
+
+
+ 2
+
+
-
+
+ Virtual Mouse
+
+
+ -
+
+ Virtual Arrow Keys
+
+
+ -
+
+ Virtual Gamepad
+
+
+
+
+
@@ -647,8 +743,6 @@
maxActorsSlider
sound3DCheckBox
musicCheckBox
- joystickCheckBox
- fullscreenCheckBox
devicesList
okButton
launchButton
@@ -657,5 +751,70 @@
-
+
+
+ maxActorsSlider
+ sliderMoved(int)
+ label
+ setNum(int)
+
+
+ 436
+ 269
+
+
+ 525
+ 274
+
+
+
+
+ maxActorsSlider
+ valueChanged(int)
+ label
+ setNum(int)
+
+
+ 387
+ 274
+
+
+ 518
+ 276
+
+
+
+
+ maxLoDSlider
+ valueChanged(int)
+ LoDNum
+ setNum(int)
+
+
+ 269
+ 270
+
+
+ 327
+ 274
+
+
+
+
+ maxLoDSlider
+ sliderMoved(int)
+ LoDNum
+ setNum(int)
+
+
+ 260
+ 277
+
+
+ 328
+ 262
+
+
+
+