mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-19 13:46:13 +00:00
Changed: Compilation with GCC
This commit is contained in:
parent
cda3c970eb
commit
870c91ee50
10 changed files with 23 additions and 26 deletions
|
@ -161,8 +161,7 @@ void CAnimationSetDialog::loadAnim()
|
||||||
QStringList::Iterator it = list.begin();
|
QStringList::Iterator it = list.begin();
|
||||||
while(it != list.end())
|
while(it != list.end())
|
||||||
{
|
{
|
||||||
std::string animName = it->toUtf8();
|
entity.loadAnimation(it->toUtf8().constData());
|
||||||
entity.loadAnimation(animName);
|
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
updateListAnim();
|
updateListAnim();
|
||||||
|
@ -187,8 +186,7 @@ void CAnimationSetDialog::loadSwt()
|
||||||
QStringList::Iterator it = list.begin();
|
QStringList::Iterator it = list.begin();
|
||||||
while(it != list.end())
|
while(it != list.end())
|
||||||
{
|
{
|
||||||
std::string swtName = it->toUtf8();
|
entity.loadSWT(it->toUtf8().constData());
|
||||||
entity.loadSWT(swtName);
|
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
updateListAnim();
|
updateListAnim();
|
||||||
|
@ -212,8 +210,7 @@ void CAnimationSetDialog::addAnim()
|
||||||
|
|
||||||
Q_FOREACH(QTreeWidgetItem *item, list)
|
Q_FOREACH(QTreeWidgetItem *item, list)
|
||||||
{
|
{
|
||||||
std::string animName = item->text(0).toUtf8();
|
entity.addAnimToPlayList(item->text(0).toUtf8().constData());
|
||||||
entity.addAnimToPlayList(animName);
|
|
||||||
ui.animPlaylistWidget->addItem(item->text(0));
|
ui.animPlaylistWidget->addItem(item->text(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ void CMorphMeshDialog::add()
|
||||||
shapeNames.resize(_CM->getNumShapes() + 1);
|
shapeNames.resize(_CM->getNumShapes() + 1);
|
||||||
_CM->getShapesNames(&shapeNames[0]);
|
_CM->getShapesNames(&shapeNames[0]);
|
||||||
uint index = (uint)shapeNames.size() - 1;
|
uint index = (uint)shapeNames.size() - 1;
|
||||||
shapeNames[index] = fileName.toUtf8();
|
shapeNames[index] = fileName.toUtf8().constData();
|
||||||
_CM->setShapes(&shapeNames[0], (uint)shapeNames.size());
|
_CM->setShapes(&shapeNames[0], (uint)shapeNames.size());
|
||||||
std::vector<sint> numVerts;
|
std::vector<sint> numVerts;
|
||||||
_CM->getShapeNumVerts(numVerts);
|
_CM->getShapeNumVerts(numVerts);
|
||||||
|
|
|
@ -468,7 +468,7 @@ void CObjectViewer::loadConfig()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_CameraFocal = settings->value("CameraFocal", 75).toInt();
|
_CameraFocal = settings->value("CameraFocal", 75).toInt();
|
||||||
_FontName = settings->value(Constants::FONT, "andbasr.ttf").toString().toUtf8();
|
_FontName = settings->value(Constants::FONT, "andbasr.ttf").toString().toUtf8().constData();
|
||||||
_BloomEffect = settings->value(Constants::ENABLE_BLOOM, false).toBool();
|
_BloomEffect = settings->value(Constants::ENABLE_BLOOM, false).toBool();
|
||||||
_BloomDensity = settings->value(Constants::BLOOM_DENSITY, 0).toInt();
|
_BloomDensity = settings->value(Constants::BLOOM_DENSITY, 0).toInt();
|
||||||
_BloomSquare = settings->value(Constants::ENABLE_SQUARE_BLOOM, false).toBool();
|
_BloomSquare = settings->value(Constants::ENABLE_SQUARE_BLOOM, false).toBool();
|
||||||
|
|
|
@ -319,7 +319,7 @@ bool CParticleTreeModel::setData(const QModelIndex &index, const QVariant &value
|
||||||
QList<QVariant> listData;
|
QList<QVariant> listData;
|
||||||
listData << value;
|
listData << value;
|
||||||
item->replace(listData);
|
item->replace(listData);
|
||||||
std::string name = value.toString().toUtf8();
|
std::string name = value.toString().toUtf8().constData();
|
||||||
if (item->itemType() == ItemType::Located)
|
if (item->itemType() == ItemType::Located)
|
||||||
item->getLoc()->setName(name);
|
item->getLoc()->setName(name);
|
||||||
else
|
else
|
||||||
|
|
|
@ -300,7 +300,7 @@ void CSkeletonScaleDialog::clickSaveAsSkel()
|
||||||
}
|
}
|
||||||
|
|
||||||
// bkup the valid fileName (new file edited)
|
// bkup the valid fileName (new file edited)
|
||||||
_SkeletonFileName = fileName.toUtf8();
|
_SkeletonFileName = fileName.toUtf8().constData();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,8 +111,8 @@ void CSlotGroupBox::updateUi()
|
||||||
void CSlotGroupBox::saveSlotInfo()
|
void CSlotGroupBox::saveSlotInfo()
|
||||||
{
|
{
|
||||||
CSlotInfo slotInfo;
|
CSlotInfo slotInfo;
|
||||||
slotInfo.Animation = _animName.toUtf8();
|
slotInfo.Animation = _animName.toUtf8().constData();
|
||||||
slotInfo.Skeleton = _skelName.toUtf8();
|
slotInfo.Skeleton = _skelName.toUtf8().constData();
|
||||||
slotInfo.EndBlend = _ui.endBlendSpinBox->value();
|
slotInfo.EndBlend = _ui.endBlendSpinBox->value();
|
||||||
slotInfo.EndTime = float(_ui.endFrameSpinBox->value()) / Modules::mainWin().getFrameRate();
|
slotInfo.EndTime = float(_ui.endFrameSpinBox->value()) / Modules::mainWin().getFrameRate();
|
||||||
slotInfo.Offset = float(_ui.offsetSpinBox->value()) / Modules::mainWin().getFrameRate();
|
slotInfo.Offset = float(_ui.offsetSpinBox->value()) / Modules::mainWin().getFrameRate();
|
||||||
|
|
|
@ -86,8 +86,8 @@ void CSoundSystem::init()
|
||||||
QSettings *settings = Core::ICore::instance()->settings();
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
settings->beginGroup(Constants::OBJECT_VIEWER_SECTION);
|
settings->beginGroup(Constants::OBJECT_VIEWER_SECTION);
|
||||||
|
|
||||||
_PackedSheetPath = settings->value(Constants::SOUND_PACKED_SHEET_PATH, "").toString().toUtf8();
|
_PackedSheetPath = settings->value(Constants::SOUND_PACKED_SHEET_PATH, "").toString().toUtf8().constData();
|
||||||
_SamplePath = settings->value(Constants::SOUND_SAMPLE_PATH, "").toString().toUtf8();
|
_SamplePath = settings->value(Constants::SOUND_SAMPLE_PATH, "").toString().toUtf8().constData();
|
||||||
_AudioMixer->setSamplePath(_SamplePath);
|
_AudioMixer->setSamplePath(_SamplePath);
|
||||||
_AudioMixer->setPackedSheetOption(_PackedSheetPath, true);
|
_AudioMixer->setPackedSheetOption(_PackedSheetPath, true);
|
||||||
std::vector<std::string> devices;
|
std::vector<std::string> devices;
|
||||||
|
|
|
@ -596,10 +596,10 @@ void CVegetableEditor::loadLandscapeSetup()
|
||||||
QSettings *settings = Core::ICore::instance()->settings();
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
settings->beginGroup(Constants::OBJECT_VIEWER_SECTION);
|
settings->beginGroup(Constants::OBJECT_VIEWER_SECTION);
|
||||||
|
|
||||||
_VegetableLandscapeTileBank = settings->value(Constants::VEGET_TILE_BANK, "").toString().toUtf8();
|
_VegetableLandscapeTileBank = settings->value(Constants::VEGET_TILE_BANK, "").toString().toUtf8().constData();
|
||||||
_VegetableLandscapeTileFarBank = settings->value(Constants::VEGET_TILE_FAR_BANK, "").toString().toUtf8();
|
_VegetableLandscapeTileFarBank = settings->value(Constants::VEGET_TILE_FAR_BANK, "").toString().toUtf8().constData();
|
||||||
_CoarseMeshTexture = settings->value(Constants::COARSE_MESH_TEXTURE, "").toString().toUtf8();
|
_CoarseMeshTexture = settings->value(Constants::COARSE_MESH_TEXTURE, "").toString().toUtf8().constData();
|
||||||
_VegetableTexture = settings->value(Constants::VEGET_TEXTURE, "").toString().toUtf8();
|
_VegetableTexture = settings->value(Constants::VEGET_TEXTURE, "").toString().toUtf8().constData();
|
||||||
|
|
||||||
QStringList list = settings->value(Constants::VEGET_LANDSCAPE_ZONES).toStringList();
|
QStringList list = settings->value(Constants::VEGET_LANDSCAPE_ZONES).toStringList();
|
||||||
_VegetableLandscapeZoneNames.clear();
|
_VegetableLandscapeZoneNames.clear();
|
||||||
|
|
|
@ -357,34 +357,34 @@ void CMainWindow::extractWords(QString typeq)
|
||||||
{
|
{
|
||||||
column_name = "item ID";
|
column_name = "item ID";
|
||||||
builderS.SheetExt = "sitem";
|
builderS.SheetExt = "sitem";
|
||||||
builderS.SheetPath = level_design_path.append("/game_element/sitem").toUtf8();
|
builderS.SheetPath = level_design_path.append("/game_element/sitem").toUtf8().constData();
|
||||||
isSheet = true;
|
isSheet = true;
|
||||||
}
|
}
|
||||||
else if(typeq.toAscii() == Constants::WK_CREATURE)
|
else if(typeq.toAscii() == Constants::WK_CREATURE)
|
||||||
{
|
{
|
||||||
column_name = "creature ID";
|
column_name = "creature ID";
|
||||||
builderS.SheetExt = "creature";
|
builderS.SheetExt = "creature";
|
||||||
builderS.SheetPath = level_design_path.append("/Game_elem/Creature/fauna").toUtf8();
|
builderS.SheetPath = level_design_path.append("/Game_elem/Creature/fauna").toUtf8().constData();
|
||||||
isSheet = true;
|
isSheet = true;
|
||||||
}
|
}
|
||||||
else if(typeq.toAscii() == Constants::WK_SBRICK)
|
else if(typeq.toAscii() == Constants::WK_SBRICK)
|
||||||
{
|
{
|
||||||
column_name = "sbrick ID";
|
column_name = "sbrick ID";
|
||||||
builderS.SheetExt = "sbrick";
|
builderS.SheetExt = "sbrick";
|
||||||
builderS.SheetPath = level_design_path.append("/game_element/sbrick").toUtf8();
|
builderS.SheetPath = level_design_path.append("/game_element/sbrick").toUtf8().constData();
|
||||||
isSheet = true;
|
isSheet = true;
|
||||||
}
|
}
|
||||||
else if(typeq.toAscii() == Constants::WK_SPHRASE)
|
else if(typeq.toAscii() == Constants::WK_SPHRASE)
|
||||||
{
|
{
|
||||||
column_name = "sphrase ID";
|
column_name = "sphrase ID";
|
||||||
builderS.SheetExt = "sphrase";
|
builderS.SheetExt = "sphrase";
|
||||||
builderS.SheetPath = level_design_path.append("/game_element/sphrase").toUtf8();
|
builderS.SheetPath = level_design_path.append("/game_element/sphrase").toUtf8().constData();
|
||||||
isSheet = true;
|
isSheet = true;
|
||||||
}
|
}
|
||||||
else if(typeq.toAscii() == Constants::WK_PLACE)
|
else if(typeq.toAscii() == Constants::WK_PLACE)
|
||||||
{
|
{
|
||||||
column_name = "placeId";
|
column_name = "placeId";
|
||||||
builderP.PrimPath = primitives_path.toUtf8();
|
builderP.PrimPath = primitives_path.toUtf8().constData();
|
||||||
builderP.PrimFilter.push_back("region_*.primitive");
|
builderP.PrimFilter.push_back("region_*.primitive");
|
||||||
builderP.PrimFilter.push_back("indoors_*.primitive");
|
builderP.PrimFilter.push_back("indoors_*.primitive");
|
||||||
isSheet = false;
|
isSheet = false;
|
||||||
|
|
|
@ -383,7 +383,7 @@ void CTile_edit_dlg::on_loadPushButton_clicked()
|
||||||
|
|
||||||
void CTile_edit_dlg::on_savePushButton_clicked()
|
void CTile_edit_dlg::on_savePushButton_clicked()
|
||||||
{
|
{
|
||||||
string fullPath = this->mainFile.absoluteFilePath().toUtf8();
|
string fullPath = this->mainFile.absoluteFilePath().toUtf8().constData();
|
||||||
if ( !fullPath.empty() )
|
if ( !fullPath.empty() )
|
||||||
{
|
{
|
||||||
COFile stream;
|
COFile stream;
|
||||||
|
@ -411,7 +411,7 @@ void CTile_edit_dlg::on_saveAsPushButton_clicked()
|
||||||
ui.savePushButton->setEnabled(true);
|
ui.savePushButton->setEnabled(true);
|
||||||
|
|
||||||
|
|
||||||
string fullPath = this->mainFile.absoluteFilePath().toUtf8();
|
string fullPath = this->mainFile.absoluteFilePath().toUtf8().constData();
|
||||||
if ( !fullPath.empty() )
|
if ( !fullPath.empty() )
|
||||||
{
|
{
|
||||||
COFile stream;
|
COFile stream;
|
||||||
|
@ -445,7 +445,7 @@ void CTile_edit_dlg::on_exportPushButton_clicked()
|
||||||
copy.cleanUnusedData ();
|
copy.cleanUnusedData ();
|
||||||
|
|
||||||
QFileInfo fileInfo(fileName);
|
QFileInfo fileInfo(fileName);
|
||||||
string fullPath = fileInfo.absoluteFilePath().toUtf8();
|
string fullPath = fileInfo.absoluteFilePath().toUtf8().constData();
|
||||||
if ( !fullPath.empty() )
|
if ( !fullPath.empty() )
|
||||||
{
|
{
|
||||||
COFile stream;
|
COFile stream;
|
||||||
|
|
Loading…
Reference in a new issue