1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

games/xptools: fix build for 11.2 and current

- lots of fixes

PR:		229517
Submitted by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
Approved by:	Michael Danilov <mike.d.ft402@gmail.com> (maintainer)
This commit is contained in:
Kurt Jaeger 2018-07-29 18:49:38 +00:00
parent 46e9bf7367
commit ca8d1fcedd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=475671
34 changed files with 1090 additions and 7 deletions

View File

@ -0,0 +1,47 @@
--- src/XESCore/AptIO.cpp.orig 2018-07-04 20:00:56 UTC
+++ src/XESCore/AptIO.cpp
@@ -707,7 +707,7 @@ printf("read open_poly %i elements\n",in
{
//If we've loop through the whole array of ramp_ai_opperation_types
//we have a problem
- if(ramp_operation_type_strings[i] == '\0')
+ if(ramp_operation_type_strings[i] == NULL)
{
ok = string("Error: ") + ramp_op_type_human_string + "is not a real Ramp Operation Type";
break;
@@ -990,7 +990,7 @@ printf("read open_poly %i elements\n",in
}
const char** str = truck_type_strings;
- while(*str != '\0')
+ while(*str != NULL)
{
if (strcmp(truck_type_str.c_str(),*str)==0)
{
@@ -998,7 +998,7 @@ printf("read open_poly %i elements\n",in
break;
}
++str;
- if (*str == '\0')
+ if (*str == NULL)
{
ok = ("Error: Truck type " + truck_type_str + " is not supported.");
}
@@ -1036,7 +1036,7 @@ printf("read open_poly %i elements\n",in
for (vector<string>::iterator itr = tokenized.begin(); itr != tokenized.end(); ++itr)
{
const char** str = truck_type_strings;
- while (*str != '\0')
+ while (*str != NULL)
{
if (strcmp(itr->c_str(), *str) == 0)
{
@@ -1044,7 +1044,7 @@ printf("read open_poly %i elements\n",in
break;
}
++str;
- if (*str == '\0')
+ if (*str == NULL)
{
ok = ("Error: Truck type " + *itr + " is not supported.");
}

View File

@ -0,0 +1,37 @@
--- src/XESCore/DEMDefs.h.orig 2018-07-15 04:23:17 UTC
+++ src/XESCore/DEMDefs.h
@@ -1217,14 +1217,32 @@ inline bool& DEMMask::operator()(int x,
inline bool DEMMask::operator()(int x, int y) const
{
- if (x < 0 || x >= mWidth || y < 0 || y >= mHeight) return DEM_NO_DATA;
+ bool b;
+// if (x < 0 || x >= mWidth || y < 0 || y >= mHeight) return DEM_NO_DATA;
+ if (x < 0 || x >= mWidth || y < 0 || y >= mHeight)
+ {
+ b=true;
+ return b;
+ }
+ else
+ {
return mData[x + y * mWidth];
+ }
}
inline bool DEMMask::get(int x, int y) const
{
- if (x < 0 || x >= mWidth || y < 0 || y >= mHeight) return DEM_NO_DATA;
+ bool b;
+// if (x < 0 || x >= mWidth || y < 0 || y >= mHeight) return DEM_NO_DATA;
+ if (x < 0 || x >= mWidth || y < 0 || y >= mHeight)
+ {
+ b=true;
+ return b;
+ }
+ else
+ {
return mData[x + y * mWidth];
+ }
}
inline void DEMMask::set(int x, int y, bool v)

View File

@ -0,0 +1,11 @@
--- src/XESCore/DEMIO.cpp.orig 2018-07-04 19:58:36 UTC
+++ src/XESCore/DEMIO.cpp
@@ -1715,7 +1715,7 @@ bool WriteNormalWithHeight(const string&
}
printf("Saving: %s\n", out_file.c_str());
- if(WriteBitmapToPNG(&image, out_file.c_str(), NULL, NULL, 2.2f))
+ if(WriteBitmapToPNG(&image, out_file.c_str(), NULL, 0, 2.2f))
{
DestroyBitmap(&image);
return false;

View File

@ -0,0 +1,11 @@
--- src/XESCore/DEMTables.cpp.orig 2018-07-05 06:58:51 UTC
+++ src/XESCore/DEMTables.cpp
@@ -481,6 +481,8 @@ bool ReadNewTerrainInfo(const vector<str
&info.composite_params[4],
&info.composite_params[5]) != 23) return false;
break;
+ default:
+ break;
}
info.proj_angle = proj_Down;

View File

@ -0,0 +1,11 @@
--- src/DSFTools/DSF2Text.cpp.orig 2018-07-15 03:25:39 UTC
+++ src/DSFTools/DSF2Text.cpp
@@ -379,7 +379,7 @@ static bool Text2DSFWithWriterAny(const
{
bool is_pipe = strcmp(inFileName, "-") == 0;
FILE * fi = (!is_pipe) ? fopen(inFileName, "r") : stdin;
- if (!fi) return NULL;
+ if (!fi) return false;
int divisions = 8;
float west = 999.0, south = 999.0, north = 999.0, east = 999.0;

View File

@ -0,0 +1,18 @@
--- src/Utils/FileUtils.cpp.orig 2018-07-05 04:33:27 UTC
+++ src/Utils/FileUtils.cpp
@@ -48,7 +48,7 @@
static int desens_partial(DIR * dir, char * io_file)
{
struct dirent* de;
- while (de = readdir(dir))
+ while ((de = readdir(dir)) != NULL)
{
if (!strcasecmp(io_file, de->d_name))
{
@@ -668,4 +668,4 @@ int FILE_compress_dir(const string& src_
return r;
-}
\ No newline at end of file
+}

View File

@ -0,0 +1,20 @@
--- src/GUI/GUI_Application.cpp.orig 2018-07-05 06:04:16 UTC
+++ src/GUI/GUI_Application.cpp
@@ -114,7 +114,7 @@ void GUI_QtMenu::showEvent( QShowEvent *
{
QList<QAction*> actlist = this->actions();
QList<QAction*>::iterator it = actlist.begin();
- for (it ; it != actlist.end(); ++it)
+ for (it = actlist.begin(); it != actlist.end(); ++it)
{
int cmd = (*it)->data().toInt();
if (cmd)
@@ -136,7 +136,7 @@ void GUI_QtMenu::hideEvent( QHideEvent *
// items and their shortcut-action while showevent .
QList<QAction*> actlist = this->actions();
QList<QAction*>::iterator it = actlist.begin();
- for (it ; it != actlist.end(); ++it)
+ for (it = actlist.begin() ; it != actlist.end(); ++it)
{
int cmd = (*it)->data().toInt();
if (cmd) (*it)->setEnabled(true);

View File

@ -0,0 +1,42 @@
--- src/GUI/GUI_Clipboard.cpp.orig 2018-07-04 22:36:05 UTC
+++ src/GUI/GUI_Clipboard.cpp
@@ -131,6 +131,7 @@ bool GUI_Clipboard_HasClipType(GUI_Cli
return (IsClipboardFormatAvailable(sCITs[inType]));
#else
#warning implement clipboard typecheck for linux
+ return true;
#endif
}
@@ -209,6 +210,7 @@ int GUI_Clipboard_GetSize(GUI_ClipTyp
#else
#warning implement clipboard GetSize for linux
+ return true;
#endif
}
@@ -240,6 +242,7 @@ bool GUI_Clipboard_GetData(GUI_ClipTyp
#else
#warning implement clipboard getData() for linux
+ return true;
#endif
}
bool GUI_Clipboard_SetData(int type_count, GUI_ClipType inTypes[], int sizes[], const void * ptrs[])
@@ -279,6 +282,7 @@ bool GUI_Clipboard_SetData(int type_co
#else
#warning implement clipboard setData() for linux
+ return true;
#endif
}
@@ -326,6 +330,7 @@ bool GUI_SetTextToClipboard(const stri
QClipboard* cb = QApplication::clipboard();
QString tex = QString::fromUtf8(inText.c_str());
cb->setText(tex);
+ return true;
#endif
}

View File

@ -0,0 +1,20 @@
--- src/GUI/GUI_Packer.cpp.orig 2018-07-05 04:58:16 UTC
+++ src/GUI/GUI_Packer.cpp
@@ -85,6 +85,8 @@ void GUI_Packer::PackPane(GUI_Pane * ch
subsize[2] = mPackArea[2];
subsize[3] = mPackArea[3];
break;
+ default:
+ break;
}
child->SetBounds(subsize);
}
@@ -113,6 +115,8 @@ void GUI_Packer::PackPaneToRight(GUI_Pa
subsize[1] = targetsize[3] - subsize[5];
mPackArea[3] = min(targetsize[1], subsize[1]);
break;
+ default:
+ break;
}
child->SetBounds(subsize);
}

View File

@ -0,0 +1,83 @@
--- src/GUI/GUI_TextTable.cpp.orig 2018-07-05 05:31:25 UTC
+++ src/GUI/GUI_TextTable.cpp
@@ -295,6 +295,8 @@ void GUI_TextTable::CellDraw (int cell
case gui_Cell_CheckBox:
c.text_val = "";
break;
+ default:
+ break;
}
if(c.can_delete)
@@ -472,6 +474,8 @@ void GUI_TextTable::CellDraw (int cell
glEnd();
glLineWidth(1);
break;
+ default:
+ break;
}
glColor4fv(mColorGridlines);
//-----------------------------------------------------------------
@@ -765,6 +769,8 @@ int GUI_TextTable::CellMouseDown(int c
mEditInfo.content_type = gui_Cell_None;
}
break;
+ default:
+ break;
}
return 1;
}
@@ -822,6 +828,8 @@ void GUI_TextTable::CellMouseDrag(int c
BroadcastMessage(GUI_TABLE_CONTENT_CHANGED, 0);
}
break;
+ default:
+ break;
}
}
@@ -881,6 +889,8 @@ void GUI_TextTable::CellMouseUp (int c
BroadcastMessage(GUI_TABLE_CONTENT_CHANGED, 0);
}
break;
+ default:
+ break;
}
if (!HasEdit())
{
@@ -977,6 +987,8 @@ GUI_DragOperation GUI_TextTable::CellDra
if (mLastOp == gui_Drag_None) if ((mLastOp = mContent->CanDropBetweenRows(cell_y + (mDragPart == drag_IntoOrHigher ? 1 : 0), drag, allowed, recommended)) != gui_Drag_None)
mDragDest = mDragPart == drag_IntoOrHigher ? gui_Insert_Top : gui_Insert_Bottom;
break;
+ default:
+ break;
}
}
else
@@ -1008,6 +1020,8 @@ GUI_DragOperation GUI_TextTable::CellDra
if (mLastOp == gui_Drag_None) if ((mLastOp = mContent->CanDropBetweenColumns(cell_x + (mDragPart == drag_IntoOrHigher ? 1 : 0), drag, allowed, recommended)) != gui_Drag_None)
mDragDest = mDragPart == drag_IntoOrHigher ? gui_Insert_Right : gui_Insert_Left;
break;
+ default:
+ break;
}
}
else
@@ -1280,6 +1294,8 @@ int GUI_TextTable::TerminateEdit(bool
case gui_Cell_Double:
mEditInfo.double_val = atof(mEditInfo.text_val.c_str());
break;
+ default:
+ break;
}
mContent->AcceptEdit(mClickCellX, mClickCellY, mEditInfo, in_all);
}
@@ -1404,6 +1420,8 @@ int GUI_TextTable::HandleKeyPress(uint
}
}
break;
+ default:
+ break;
}
if(inKey == GUI_KEY_TAB && HasEdit() && mContent)

View File

@ -0,0 +1,11 @@
--- src/RenderFarmUI/RF_Main.cpp.orig 2018-07-04 20:42:21 UTC
+++ src/RenderFarmUI/RF_Main.cpp
@@ -303,7 +303,7 @@ static GISTool_RegCmd_t sUtilCmds[] = {
-static int fifo = NULL;
+static int fifo = 0;
static float CheckFifo(void)
{

View File

@ -0,0 +1,11 @@
--- src/RenderFarmUI/RF_Selection.cpp.orig 2018-07-05 20:35:32 UTC
+++ src/RenderFarmUI/RF_Selection.cpp
@@ -40,7 +40,7 @@ void RF_SetSelectionMode(int mode)
if (mode != rf_Select_Face && ! gFaceSelection.empty()) { gFaceSelection.clear(); cleared = 1; }
if (mode != rf_Select_PointFeatures && !gPointFeatureSelection.empty()) { gPointFeatureSelection.clear(); cleared = 1; }
- RF_Notifiable::Notify(rf_Cat_Selection, rf_Msg_SelectionModeChanged, (void *) cleared);
+ RF_Notifiable::Notify(rf_Cat_Selection, rf_Msg_SelectionModeChanged, (void *)(size_t) cleared);
}

View File

@ -0,0 +1,11 @@
--- src/WEDMap/WED_ATCLayer.cpp.orig 2018-07-05 15:08:08 UTC
+++ src/WEDMap/WED_ATCLayer.cpp
@@ -131,7 +131,7 @@ bool WED_ATCLayer::DrawEntityStructure
bool road = seg->AllowTrucks() && !seg->AllowAircraft();
bool one_way = seg->IsOneway();
- int mtr1 = 5, mtr2 = 10;
+ double mtr1 = 5, mtr2 = 10;
switch(icao_width) {
case width_A: mtr1 = 4.5; mtr2 = 15.0; break;
case width_B: mtr1 = 6.0; mtr2 = 24.0; break;

View File

@ -0,0 +1,12 @@
--- src/WEDWindows/WED_AboutBox.cpp.orig 2018-07-08 15:08:31 UTC
+++ src/WEDWindows/WED_AboutBox.cpp
@@ -79,8 +79,7 @@ void WED_AboutBox::Draw(GUI_GraphState
}
char buf[1024];
-
- sprintf(buf,"WorldEditor " WED_VERSION_STRING ", compiled on "__DATE__" "__TIME__);
+ sprintf( buf, "WorldEditor " WED_VERSION_STRING ", compiled on " "%s %s", __DATE__, __TIME__);
GUI_FontDrawScaled(state, font_UI_Basic, color,
bounds[0],

View File

@ -0,0 +1,135 @@
--- src/WEDImportExport/WED_AptIE.cpp.orig 2018-07-05 06:19:23 UTC
+++ src/WEDImportExport/WED_AptIE.cpp
@@ -309,7 +309,7 @@ void AptExportRecursive(WED_Thing * what
* a bogus export. */
if(dynamic_cast<WED_OverlayImage *>(what)) return;
- if (apt = dynamic_cast<WED_Airport *>(what))
+ if ((apt = dynamic_cast<WED_Airport *>(what)) != NULL)
{
apts.push_back(AptInfo_t());
apt->Export(apts.back());
@@ -338,11 +338,11 @@ void AptExportRecursive(WED_Thing * what
#endif
}
- else if (bcn = dynamic_cast<WED_AirportBeacon *>(what))
+ else if ((bcn = dynamic_cast<WED_AirportBeacon *>(what)) != NULL)
{
bcn->Export(apts.back().beacon);
}
- else if (bou = dynamic_cast<WED_AirportBoundary *>(what))
+ else if ((bou == dynamic_cast<WED_AirportBoundary *>(what)) != 0)
{
apts.back().boundaries.push_back(AptBoundary_t());
bou->Export(apts.back().boundaries.back());
@@ -357,44 +357,44 @@ void AptExportRecursive(WED_Thing * what
return; // bail out - we already got the children.
}
- else if (cha = dynamic_cast<WED_AirportChain *>(what))
+ else if ((cha = dynamic_cast<WED_AirportChain *>(what)) != NULL)
{
apts.back().lines.push_back(AptMarking_t());
cha->Export(apts.back().lines.back());
ExportLinearPath(cha, apts.back().lines.back().area);
return; // don't waste time with nodes - for speed
}
- else if (sgn = dynamic_cast<WED_AirportSign *>(what))
+ else if ((sgn = dynamic_cast<WED_AirportSign *>(what)) != NULL)
{
apts.back().signs.push_back(AptSign_t());
sgn->Export(apts.back().signs.back());
}
- else if (hel = dynamic_cast<WED_Helipad *>(what))
+ else if ((hel = dynamic_cast<WED_Helipad *>(what)) != NULL)
{
apts.back().helipads.push_back(AptHelipad_t());
hel->Export(apts.back().helipads.back());
}
- else if (lit = dynamic_cast<WED_LightFixture *>(what))
+ else if ((lit = dynamic_cast<WED_LightFixture *>(what)) != NULL)
{
apts.back().lights.push_back(AptLight_t());
lit->Export(apts.back().lights.back());
}
- else if (ram = dynamic_cast<WED_RampPosition *>(what))
+ else if ((ram = dynamic_cast<WED_RampPosition *>(what)) != NULL)
{
apts.back().gates.push_back(AptGate_t());
ram->Export(apts.back().gates.back());
}
- else if (rwy = dynamic_cast<WED_Runway *>(what))
+ else if ((rwy = dynamic_cast<WED_Runway *>(what)) != NULL)
{
apts.back().runways.push_back(AptRunway_t());
rwy->Export(apts.back().runways.back());
}
- else if (sea = dynamic_cast<WED_Sealane *>(what))
+ else if ((sea = dynamic_cast<WED_Sealane *>(what)) != NULL)
{
apts.back().sealanes.push_back(AptSealane_t());
sea->Export(apts.back().sealanes.back());
}
- else if (tax = dynamic_cast<WED_Taxiway *>(what))
+ else if ((tax = dynamic_cast<WED_Taxiway *>(what)) != NULL)
{
apts.back().taxiways.push_back(AptTaxiway_t());
tax->Export(apts.back().taxiways.back());
@@ -409,47 +409,47 @@ void AptExportRecursive(WED_Thing * what
}
return; // bail out - we already got the children
}
- else if (twr = dynamic_cast<WED_TowerViewpoint *>(what))
+ else if ((twr = dynamic_cast<WED_TowerViewpoint *>(what)) != NULL)
{
twr->Export(apts.back().tower);
}
- else if (win = dynamic_cast<WED_Windsock *>(what))
+ else if ((win = dynamic_cast<WED_Windsock *>(what)) != NULL)
{
apts.back().windsocks.push_back(AptWindsock_t());
win->Export(apts.back().windsocks.back());
}
- else if (atc = dynamic_cast<WED_ATCFrequency *>(what))
+ else if ((atc = dynamic_cast<WED_ATCFrequency *>(what)) != NULL )
{
apts.back().atc.push_back(AptATCFreq_t());
atc->Export(apts.back().atc.back());
}
#if AIRPORT_ROUTING
- else if(flw = dynamic_cast<WED_ATCFlow *>(what))
+ else if((flw = dynamic_cast<WED_ATCFlow *>(what)) != NULL)
{
apts.back().flows.push_back(AptFlow_t());
flw->Export(apts.back().flows.back());
}
- else if(use = dynamic_cast<WED_ATCRunwayUse *>(what))
+ else if((use = dynamic_cast<WED_ATCRunwayUse *>(what)) != NULL)
{
apts.back().flows.back().runway_rules.push_back(AptRunwayRule_t());
use->Export(apts.back().flows.back().runway_rules.back());
}
- else if(tim = dynamic_cast<WED_ATCTimeRule *>(what))
+ else if((tim = dynamic_cast<WED_ATCTimeRule *>(what)) != NULL)
{
apts.back().flows.back().time_rules.push_back(AptTimeRule_t());
tim->Export(apts.back().flows.back().time_rules.back());
}
- else if(wnd = dynamic_cast<WED_ATCWindRule *>(what))
+ else if((wnd = dynamic_cast<WED_ATCWindRule *>(what)) != NULL)
{
apts.back().flows.back().wind_rules.push_back(AptWindRule_t());
wnd->Export(apts.back().flows.back().wind_rules.back());
}
- else if(trk = dynamic_cast<WED_TruckParkingLocation*>(what))
+ else if((trk = dynamic_cast<WED_TruckParkingLocation*>(what)) != NULL)
{
apts.back().truck_parking.push_back(AptTruckParking_t());
trk->Export(apts.back().truck_parking.back());
}
- else if(dst = dynamic_cast<WED_TruckDestination*>(what))
+ else if((dst == dynamic_cast<WED_TruckDestination*>(what)) != 0)
{
apts.back().truck_destinations.push_back(AptTruckDestination_t());
dst->Export(apts.back().truck_destinations.back());

View File

@ -0,0 +1,20 @@
--- src/WEDMap/WED_CreateEdgeTool.cpp.orig 2018-07-05 09:49:45 UTC
+++ src/WEDMap/WED_CreateEdgeTool.cpp
@@ -413,6 +413,8 @@ void WED_CreateEdgeTool::FindNear(WED_Th
for(int n = 0; n < c->GetNumEntities(); ++n)
FindNear(NULL,c->GetNthEntity(n), filter, loc, out_thing, out_dsq);
}
+ default:
+ break;
}
}
else
@@ -485,6 +487,8 @@ void WED_CreateEdgeTool::FindNearP2S(WED
for(int n = 0; n < c->GetNumEntities(); ++n)
FindNearP2S(NULL,c->GetNthEntity(n), filter, loc, out_thing, out_dsq);
}
+ default:
+ break;
}
}
else

View File

@ -0,0 +1,22 @@
--- src/WEDMap/WED_CreatePolygonTool.cpp.orig 2018-07-05 13:24:15 UTC
+++ src/WEDMap/WED_CreatePolygonTool.cpp
@@ -350,12 +350,18 @@ void WED_CreatePolygonTool::AcceptPath(
pol_info_t info;
if(rmgr->GetPol(mResource.value, info))
+ {
if (!info.mUVBox.is_null())
+ {
dpol->SetSubTexture(info.mUVBox);
+ }
else
+ {
dpol->SetSubTexture(Bbox2(0,0,1,1));
-
+ }
dpol->Redrape();
+ }
+
}
else if (mType == create_Hole && host->GetClass() == WED_DrapedOrthophoto::sClass) // holes in orthos also need UV map set
dynamic_cast <WED_DrapedOrthophoto *> (host)->Redrape();

View File

@ -0,0 +1,11 @@
--- src/WEDFileCache/WED_FileCache.cpp.orig 2018-07-04 19:57:32 UTC
+++ src/WEDFileCache/WED_FileCache.cpp
@@ -157,7 +157,7 @@ void CACHE_FileCacheInitializer::init()
}
else
{
- paired_files.push_back(make_pair<string,string>(files[i], files[i+1]));
+ paired_files.push_back(make_pair(files[i], files[i+1]));
i += 2;
}
}

View File

@ -0,0 +1,11 @@
--- src/WEDImportExport/WED_GatewayExport.cpp.orig 2018-07-07 14:06:35 UTC
+++ src/WEDImportExport/WED_GatewayExport.cpp
@@ -572,7 +572,7 @@ void WED_GatewayExportDialog::Submit()
vector<char> temp_chars(temp_folder.begin(),temp_folder.end());
temp_chars.push_back(0);
- if(!mktemp(&temp_chars[0]))
+ if(!mkstemp(&temp_chars[0]))
{
gExportTarget = old_target;
return;

View File

@ -0,0 +1,20 @@
--- src/WEDWindows/WED_GroupCommands.cpp.orig 2018-07-05 04:46:46 UTC
+++ src/WEDWindows/WED_GroupCommands.cpp
@@ -1091,7 +1091,7 @@ set<WED_GISEdge*> do_select_crossing(vec
Bezier2 b1, b2;
bool isb1, isb2;
- if (isb1 = ii->GetSide(gis_Geo, 0, s1, b1))
+ if ((isb1 == ii->GetSide(gis_Geo, 0, s1, b1)) == true)
{
s1.p1 = b1.p1;
s1.p2 = b1.p2;
@@ -1102,7 +1102,7 @@ set<WED_GISEdge*> do_select_crossing(vec
b1.c2 = b1.p2;
}
- if (isb2 = jj->GetSide(gis_Geo, 0, s2, b2))
+ if ((isb2 == jj->GetSide(gis_Geo, 0, s2, b2)) == true)
{
s2.p1 = b2.p1;
s2.p2 = b2.p2;

View File

@ -0,0 +1,47 @@
--- src/WEDMap/WED_HandleToolBase.cpp.orig 2018-07-05 13:11:22 UTC
+++ src/WEDMap/WED_HandleToolBase.cpp
@@ -513,6 +513,8 @@ int WED_HandleToolBase::ProcessSelectio
if (pt_sel && entity->PtOnFrame(gis_Geo,psel, frame_dist)) { result.insert(entity); return 1; }
break;
+ default:
+ break;
}
return 0;
}
@@ -535,6 +537,8 @@ void WED_HandleToolBase::HandleClickDra
case drag_Handles: mHandles->ControlsHandlesBy(mHandleEntity, mHandleIndex, delta, mTrackPoint); break;
case drag_Links: mHandles->ControlsLinksBy(mHandleEntity, mHandleIndex, delta, mTrackPoint); break;
case drag_Ent: mHandles->ControlsMoveBy(mHandleEntity, delta, mTrackPoint); break;
+ default:
+ break;
}
}
break;
@@ -592,6 +596,8 @@ void WED_HandleToolBase::HandleClickDra
}
}
break;
+ default:
+ break;
}
}
@@ -684,6 +690,8 @@ void WED_HandleToolBase::DrawStructure
case link_Ghost: glColor4fv(WED_Color_RGBA(wed_GhostLink)); break;
case link_BezierCtrl: glColor4fv(WED_Color_RGBA(wed_ControlLink)); break;
case link_Marquee: glColor4fv(WED_Color_RGBA(wed_Marquee)); break;
+ default:
+ break;
}
if (ControlLinkToCurve(mHandles,eid,l,b,s,GetZoomer()))
{
@@ -752,6 +760,8 @@ void WED_HandleToolBase::DrawStructure
case handle_Arrow: GUI_PlotIcon(g,"handle_arrowhead.png", scrpt.x(),scrpt.y(),atan2(orient.dx,orient.dy) * RAD_TO_DEG,1.0); break;
case handle_RotateHead:
case handle_Rotate: GUI_PlotIcon(g,"handle_rotatehead.png", scrpt.x(),scrpt.y(),atan2(orient.dx,orient.dy) * RAD_TO_DEG,1.0); break;
+ default:
+ break;
}
}
}

View File

@ -0,0 +1,26 @@
--- src/WEDCore/WED_Package.cpp.orig 2018-07-05 05:01:58 UTC
+++ src/WEDCore/WED_Package.cpp
@@ -103,11 +103,11 @@ WED_Package::WED_Package(const char * in
string wed_folder = mPackageBase + EDIT_DIR_NAME + EARTH_DIR_NAME;
string earth_folder = mPackageBase + EARTH_DIR_NAME;
int err;
- if (err = FILE_make_dir_exist(mPackageBase.c_str()))
+ if ((err = FILE_make_dir_exist(mPackageBase.c_str())) == true)
WED_ThrowPrintf("Unable to create directory %s: %d", mPackageBase.c_str(), err);
- if (err = FILE_make_dir_exist(wed_folder.c_str()))
+ if ((err = FILE_make_dir_exist(wed_folder.c_str())) == true)
WED_ThrowPrintf("Unable to create directory %s: %d", wed_folder.c_str(), err);
- if (err = FILE_make_dir_exist(earth_folder.c_str()))
+ if ((err = FILE_make_dir_exist(earth_folder.c_str())) == true)
WED_ThrowPrintf("Unable to create directory %s: %d", earth_folder.c_str(), err);
}
@@ -174,7 +174,7 @@ WED_Document * WED_Package::OpenTile(int
sprintf(partial, DIR_STR "%+03d%+04d", latlon_bucket(lat),latlon_bucket(lon));
string parent = mPackageBase + EDIT_DIR_NAME + EARTH_DIR_NAME + partial;
int err;
- if (err = FILE_make_dir_exist(parent.c_str()))
+ if ((err = FILE_make_dir_exist(parent.c_str())) == true)
WED_ThrowPrintf("Unable to open create %s: %d", parent.c_str(), err);
WED_Document * tile = new WED_Document(path, bounds);

View File

@ -0,0 +1,15 @@
--- src/WEDMap/WED_PreviewLayer.cpp.orig 2018-07-05 13:03:46 UTC
+++ src/WEDMap/WED_PreviewLayer.cpp
@@ -362,9 +362,9 @@ struct preview_runway : public WED_Previ
// First, transform our geometry.
rwy->GetCorners(gis_Geo,corners); zoomer->LLToPixelv(corners, corners, 4);
- if (has_blas1 = rwy->GetCornersBlas1(blas1)) zoomer->LLToPixelv(blas1, blas1, 4);
- if (has_blas2 = rwy->GetCornersBlas2(blas2)) zoomer->LLToPixelv(blas2, blas2, 4);
- if (has_shoulders = rwy->GetCornersShoulders(shoulders)) zoomer->LLToPixelv(shoulders, shoulders, 8);
+ if (has_blas1 == rwy->GetCornersBlas1(blas1)) zoomer->LLToPixelv(blas1, blas1, 4);
+ if (has_blas2 == rwy->GetCornersBlas2(blas2)) zoomer->LLToPixelv(blas2, blas2, 4);
+ if (has_shoulders == rwy->GetCornersShoulders(shoulders)) zoomer->LLToPixelv(shoulders, shoulders, 8);
if (mPavementAlpha > 0.0f)
{

View File

@ -0,0 +1,37 @@
--- src/WEDMap/WED_StructureLayer.cpp.orig 2018-07-05 12:13:38 UTC
+++ src/WEDMap/WED_StructureLayer.cpp
@@ -214,11 +214,11 @@ bool WED_StructureLayer::DrawEntityStru
// First, transform our geometry.
rwy->GetCorners(gis_Geo,corners); GetZoomer()->LLToPixelv(corners, corners, 4);
- if (has_blas1 = rwy->GetCornersBlas1(blas1)) GetZoomer()->LLToPixelv(blas1, blas1, 4);
- if (has_blas2 = rwy->GetCornersBlas2(blas2)) GetZoomer()->LLToPixelv(blas2, blas2, 4);
- if (has_disp1 = rwy->GetCornersDisp1(disp1)) GetZoomer()->LLToPixelv(disp1, disp1, 4);
- if (has_disp2 = rwy->GetCornersDisp2(disp2)) GetZoomer()->LLToPixelv(disp2, disp2, 4);
- if (has_shoulders = rwy->GetCornersShoulders(shoulders)) GetZoomer()->LLToPixelv(shoulders, shoulders, 8);
+ if (has_blas1 == rwy->GetCornersBlas1(blas1)) GetZoomer()->LLToPixelv(blas1, blas1, 4);
+ if ((has_blas2 = rwy->GetCornersBlas2(blas2)) == true) GetZoomer()->LLToPixelv(blas2, blas2, 4);
+ if ((has_disp1 = rwy->GetCornersDisp1(disp1)) == true) GetZoomer()->LLToPixelv(disp1, disp1, 4);
+ if ((has_disp2 == rwy->GetCornersDisp2(disp2)) == true) GetZoomer()->LLToPixelv(disp2, disp2, 4);
+ if ((has_shoulders == rwy->GetCornersShoulders(shoulders)) ==true) GetZoomer()->LLToPixelv(shoulders, shoulders, 8);
// "Outline" geometry
glColor4fv(WED_Color_RGBA(struct_color));
@@ -593,6 +593,8 @@ bool WED_StructureLayer::DrawEntityStru
this->DrawEntityStructure(inCurrent,poly->GetNthHole(c),g,selected);
}
break;
+ default:
+ break;
}
return true;
}
@@ -707,6 +709,8 @@ bool WED_StructureLayer::DrawEntityVisu
}
}
break;
+ default:
+ break;
}
return true;
}

View File

@ -0,0 +1,38 @@
--- src/WEDTCE/WED_TCEVertexTool.cpp.orig 2018-07-07 14:23:29 UTC
+++ src/WEDTCE/WED_TCEVertexTool.cpp
@@ -156,6 +156,8 @@ void WED_TCEVertexTool::GetNthControlHa
}
}
break;
+ default:
+ break;
}
}
@@ -329,6 +331,8 @@ void WED_TCEVertexTool::ControlsHandles
}
}
break;
+ default:
+ break;
}
// now that we used TCE to modify the UVmaping, update UVbounds
@@ -355,6 +359,8 @@ void WED_TCEVertexTool::ControlsLinksBy
p2->GetLocation(gis_UV,p); p += delta; p2->SetLocation(gis_UV,p);
}
break;
+ default:
+ break;
}
// now that we used TCE to modify the UVmaping, update UVbounds
updateUVbounds(who);
@@ -413,6 +419,8 @@ void WED_TCEVertexTool::SyncRecurse(IGIS
if((c = dynamic_cast<IGISComposite *>(who)) != NULL)
for(int n = 0; n < c->GetNumEntities(); ++n)
SyncRecurse(c->GetNthEntity(n),sel);
+ default:
+ break;
}
}

View File

@ -0,0 +1,110 @@
--- src/WEDMap/WED_VertexTool.cpp.orig 2018-07-07 01:19:06 UTC
+++ src/WEDMap/WED_VertexTool.cpp
@@ -182,6 +182,8 @@ int WED_VertexTool::CountControlHandles
e = dynamic_cast<IGISEdge *>(en);
DebugAssert(e);
return e ? 4 : 0;
+ default:
+ break;
}
return 0;
}
@@ -460,6 +462,8 @@ void WED_VertexTool::GetNthControlHandle
return;
}
break;
+ default:
+ break;
}
DebugAssert(!"Cast failed!");
return;
@@ -497,6 +501,8 @@ int WED_VertexTool::GetLinks (intp
case gis_Edge:
e = dynamic_cast<IGISEdge*>(en);
return e ? 3 : 0;
+ default:
+ break;
}
return 0;
}
@@ -533,6 +539,8 @@ void WED_VertexTool::GetNthLinkInfo (in
if(ltype) *ltype = link_BezierCtrl;
if(active) *active = 0;
}
+ default:
+ break;
}
}
@@ -558,6 +566,8 @@ int WED_VertexTool::GetNthLinkSource
case 1: return 0;
case 2: return 3;
}
+ default:
+ break;
}
return 0;
}
@@ -575,6 +585,8 @@ int WED_VertexTool::GetNthLinkSourceCtl
case 1: return 0;
case 2: return 3;
}
+ default:
+ break;
}
return -1;
}
@@ -599,6 +611,8 @@ int WED_VertexTool::GetNthLinkTarget
case 1: return 1;
case 2: return 2;
}
+ default:
+ break;
}
return 0;
}
@@ -616,6 +630,8 @@ int WED_VertexTool::GetNthLinkTargetCtl
case 1: return 1;
case 2: return 2;
}
+ default:
+ break;
}
return -1;
}
@@ -696,6 +712,8 @@ void WED_VertexTool::ControlsHandlesBy(i
case 10: rwy->SetDisp1(rwy->GetDisp1() + axis.dot(delta_m)); break;
case 11: rwy->SetDisp2(rwy->GetDisp2() + axis.dot(delta_m)); break;
case 12: rwy->SetBlas2(rwy->GetBlas2() + axis.dot(delta_m)); break;
+ default:
+ break;
}
io_pt += delta;
@@ -870,6 +888,8 @@ void WED_VertexTool::ControlsHandlesBy(i
}
return;
}
+ default:
+ break;
}
DebugAssert(!"Cast failed!");
return;
@@ -1058,6 +1078,8 @@ void WED_VertexTool::AddEntityRecursive
AddEntityRecursive(cmp->GetNthEntity(n),vis_area);
}
break;
+ default:
+ break;
}
}
@@ -1147,6 +1169,8 @@ void WED_VertexTool::AddSnapPointRecurs
AddSnapPointRecursive(cmp->GetNthEntity(n),vis_area, sel);
}
break;
+ default:
+ break;
}
}

View File

@ -1,6 +1,6 @@
--- libs/Makefile.orig 2015-11-30 20:55:15 UTC
--- libs/Makefile.orig 2018-07-06 23:45:40 UTC
+++ libs/Makefile
@@ -111,6 +111,10 @@
@@ -111,6 +111,10 @@ ifeq ($(PLATFORM), Linux)
PLAT_LINUX := Yes
VIS := -fvisibility=hidden
endif
@ -11,7 +11,7 @@
# boost
ARCHIVE_BOOST := boost_$(VER_BOOST).tar.gz
@@ -368,9 +372,7 @@
@@ -368,9 +372,7 @@ libtiff libproj libgeotiff libsqlite lib
libexpat libgmp libmpfr libssl libcurl libjasper
all: ./local$(MULTI_SUFFIX)/.xpt_libs
@ -22,7 +22,7 @@
@touch ./local$(MULTI_SUFFIX)/.xpt_libs
clean:
@@ -629,11 +631,7 @@
@@ -629,11 +631,7 @@ libsquish: ./local$(MULTI_SUFFIX)/lib/.x
libcgal: ./local$(MULTI_SUFFIX)/lib/.xpt_libcgal
@ -35,7 +35,7 @@
@echo "building libcgal..."
@-mkdir -p "./local$(MULTI_SUFFIX)/include"
@-mkdir -p "./local$(MULTI_SUFFIX)/lib"
@@ -663,24 +661,17 @@
@@ -663,24 +661,17 @@ ifdef PLAT_DARWIN
endif
ifdef PLAT_LINUX
@cd "CGAL-$(VER_CGAL)" && \
@ -64,3 +64,16 @@
endif
ifdef PLAT_MINGW
@cd "CGAL-$(VER_CGAL)" && \
@@ -702,6 +693,12 @@ ifdef PLAT_MINGW
-DWITH_CGAL_Qt4=OFF $(BE_QUIET) && \
make $(BE_QUIET) && make install $(BE_QUIET)
endif
+ sed -i "" 's|static_cast<limb2>(-1) << sizeof_limb|static_cast<limb2>(-1U << sizeof_limb)|g' \
+ ./local/include/CGAL/MP_Float.h
+# Placeholder
+# ./local/include/CGAL/Compact_container.h
+ sed -i "" 's|return \&\*rhs == NULL;|return rhs.operator->() == NULL;|'\
+ ./local/include/CGAL/Compact_container.h
@-rm -rf CGAL-$(VER_CGAL)
@touch $@

View File

@ -0,0 +1,29 @@
--- src/AC3DPlugins/obj8_export.cpp.orig 2018-07-05 08:55:46 UTC
+++ src/AC3DPlugins/obj8_export.cpp
@@ -825,8 +825,8 @@ void ag_output_polygon(FILE * fi, Surfac
if (p1->y == p2->y &&
p1->y == p3->y &&
- p1->y == p4->y)
- if(s->normal.y > 0.0)
+ p1->y == p4->y) {
+ if(s->normal.y > 0.0) {
if(p1->y < 0.0)
{
@@ -849,6 +849,8 @@ void ag_output_polygon(FILE * fi, Surfac
p3->x + x_off,z_off + p3->z,
p4->x + x_off,z_off + p4->z);
}
+ }
+ }
}
}
@@ -896,4 +898,4 @@ int do_ag_save(char * fname, ACObject *
fclose(fi);
return 1;
-}
\ No newline at end of file
+}

View File

@ -0,0 +1,11 @@
--- src/AC3DPlugins/obj8_import.cpp.orig 2018-07-05 08:49:54 UTC
+++ src/AC3DPlugins/obj8_import.cpp
@@ -503,7 +503,7 @@ ACObject * do_obj8_load(char *filename)
panel_get_import_scaling(panel_id,last_reg,&s_mul,&t_mul,&s_add,&t_add);
break;
case attr_No_Blend:
- if (!no_blend != cmd->params[0]) stuff_obj = NULL;
+ if ((!no_blend) != cmd->params[0]) stuff_obj = NULL;
no_blend = cmd->params[0];
break;
case attr_Blend:

View File

@ -0,0 +1,14 @@
--- src/AC3DPlugins/obj_editor.cpp.orig 2018-07-05 08:52:21 UTC
+++ src/AC3DPlugins/obj_editor.cpp
@@ -445,9 +445,9 @@ void OBJ_editor_init(void)
for (uintptr_t n = 0; n < NUM_KEYFRAMES; ++n)
{
char buf[25];
- sprintf(buf,"xplane_anim_value%d", n);
+ sprintf(buf,"xplane_anim_value%lu", n);
anim_value_vars[n] = new TCL_linked_vardv(ac_get_tcl_interp(), STRING(buf), MAX_MULTI_COUNT, xplane_anim_value_cb, (void *) n, 0);
- sprintf(buf,"xplane_anim_angle%d", n);
+ sprintf(buf,"xplane_anim_angle%lu", n);
anim_angle_vars[n] = new TCL_linked_vardv(ac_get_tcl_interp(), STRING(buf), MAX_MULTI_COUNT, xplane_anim_angle_cb, (void *) n, 0);
}

View File

@ -0,0 +1,37 @@
--- src/AC3DPlugins/obj_model.cpp.orig 2018-07-05 08:41:42 UTC
+++ src/AC3DPlugins/obj_model.cpp
@@ -354,24 +354,28 @@ float OBJ_get_anim_nth_angle(ACObject *
int OBJ_get_panel_left(ACObject * obj, int r)
{
char tag[25];
- sprintf(tag,"left0",r);
+ sprintf(tag,"%s","left0");
+ printf("%d",r);
return OBJ_get_property_int(obj,tag);
}
int OBJ_get_panel_bottom(ACObject * obj, int r)
{
char tag[25];
- sprintf(tag,"bottom0",r);
+ sprintf(tag, "%s","bottom0");
+ printf("%d",r);
return OBJ_get_property_int(obj,tag);
}
int OBJ_get_panel_right(ACObject * obj, int r)
{
char tag[25];
- sprintf(tag,"right0",r);
+ sprintf(tag,"%s","right0");
+ printf("%d",r);
return OBJ_get_property_int(obj,tag);
}
int OBJ_get_panel_top(ACObject * obj, int r)
{
char tag[25];
- sprintf(tag,"top0",r);
+ sprintf(tag,"%s","top0");
+ printf("%d",r);
return OBJ_get_property_int(obj,tag);
-}
\ No newline at end of file
+}

View File

@ -1,12 +1,14 @@
/usr/local/include/boost/numeric/interval/hw_rounding.hpp:42:4: error: Boost.Numeric.Interval: Please specify rounding control mechanism.
--- src/XESCore/Airports.cpp.orig 2017-11-07 03:31:14 UTC
--- src/XESCore/Airports.cpp.orig 2018-07-05 08:14:27 UTC
+++ src/XESCore/Airports.cpp
@@ -38,6 +38,10 @@
@@ -38,6 +38,12 @@
#include "CompGeomUtils.h"
#include "MapBuffer.h"
#include <CGAL/convex_hull_2.h>
+// FIXME Arch-specific!
+#ifndef __x86_64__
+#define __x86_64__ YES
+#endif
+#define __USE_ISOC99 YES
+// END FIXME
#include <CGAL/Sweep_line_2_algorithms.h>

View File

@ -0,0 +1,126 @@
--- src/Utils/unzip.c.orig 2018-07-04 22:41:04 UTC
+++ src/Utils/unzip.c
@@ -509,11 +509,18 @@ local int unzlocal_GetCurrentFileInfoInt
/* we check the magic */
if (err==UNZ_OK)
- if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
+ {
+ if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK) {
err=UNZ_ERRNO;
- else if (uMagic!=0x02014b50)
- err=UNZ_BADZIPFILE;
-
+ }
+ else
+ {
+ if (uMagic!=0x02014b50)
+ {
+ err=UNZ_BADZIPFILE;
+ }
+ }
+ }
if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK)
err=UNZ_ERRNO;
@@ -584,24 +591,34 @@ local int unzlocal_GetCurrentFileInfoInt
{
uLong uSizeRead ;
if (file_info.size_file_extra<extraFieldBufferSize)
+ {
uSizeRead = file_info.size_file_extra;
+ }
else
+ {
uSizeRead = extraFieldBufferSize;
-
- if (lSeek!=0)
- if (fseek(s->file,lSeek,SEEK_CUR)==0)
+ }
+ if (lSeek!=0)
+ {
+ if (fseek(s->file,lSeek,SEEK_CUR)==0)
+ {
lSeek=0;
+ }
else
+ {
err=UNZ_ERRNO;
+ }
+ }
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
if (fread(extraField,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO;
lSeek += file_info.size_file_extra - uSizeRead;
}
else
+ {
lSeek+=file_info.size_file_extra;
-
+ }
if ((err==UNZ_OK) && (szComment!=NULL))
{
uLong uSizeRead ;
@@ -611,17 +628,30 @@ local int unzlocal_GetCurrentFileInfoInt
uSizeRead = file_info.size_file_comment;
}
else
+ {
uSizeRead = commentBufferSize;
+ }
- if (lSeek!=0)
- if (fseek(s->file,lSeek,SEEK_CUR)==0)
+ if (lSeek!=0)
+ {
+ if (fseek(s->file,lSeek,SEEK_CUR)==0)
+ {
lSeek=0;
+ }
else
+ {
err=UNZ_ERRNO;
+ }
+ }
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
- if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
+ {
+ if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
+ {
err=UNZ_ERRNO;
+ }
+ }
lSeek+=file_info.size_file_comment - uSizeRead;
+
}
else
lSeek+=file_info.size_file_comment;
@@ -791,10 +821,16 @@ local int unzlocal_CheckCurrentFileCoher
if (err==UNZ_OK)
- if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
+ {
+ if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK){
err=UNZ_ERRNO;
- else if (uMagic!=0x04034b50)
+ }
+ else
+ {
+ if (uMagic!=0x04034b50)
err=UNZ_BADZIPFILE;
+ }
+ }
if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
err=UNZ_ERRNO;
@@ -977,7 +1013,7 @@ extern int ZEXPORT unzReadCurrentFile (
return UNZ_PARAMERROR;
- if ((pfile_in_zip_read_info->read_buffer == NULL))
+ if (pfile_in_zip_read_info->read_buffer == NULL)
return UNZ_END_OF_LIST_OF_FILE;
if (len==0)
return 0;

View File

@ -0,0 +1,14 @@
--- src/Utils/zip.c.orig 2018-07-05 04:29:44 UTC
+++ src/Utils/zip.c
@@ -378,9 +378,9 @@ extern int ZEXPORT zipOpenNewFileInZip (
zi->ci.flag = 0;
if ((level==8) || (level==9))
zi->ci.flag |= 2;
- if ((level==2))
+ if (level==2)
zi->ci.flag |= 4;
- if ((level==1))
+ if (level==1)
zi->ci.flag |= 6;
zi->ci.crc32 = 0;