From 0ee1acb63f6f114cc77cef327e9a77981c4d15b9 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 12 Apr 2017 20:07:28 +0200
Subject: Fix build, disable sound.


diff --git a/Jamfile b/Jamfile
index 8f1350f..88d2e79 100644
--- a/Jamfile
+++ b/Jamfile
@@ -1,4 +1,4 @@
 SubDir TOP ;
 
-SubInclude TOP source ;
+SubInclude TOP src ;
 SubInclude TOP libs ;
diff --git a/libs/columnlistview/ColumnListView.cpp b/libs/columnlistview/ColumnListView.cpp
index 91bf16a..c608989 100644
--- a/libs/columnlistview/ColumnListView.cpp
+++ b/libs/columnlistview/ColumnListView.cpp
@@ -2376,7 +2376,7 @@ void
 TitleView::DrawTitle(BView* view, BRect rect, BColumn* column, bool depressed)
 {
 	BRect drawRect;
-	rgb_color borderColor = mix_color(
+	rgb_color borderColor = ::mix_color(
 		fMasterView->Color(B_COLOR_HEADER_BACKGROUND),
 		make_color(0, 0, 0), 128);
 	rgb_color backgroundColor;
@@ -2389,19 +2389,19 @@ TitleView::DrawTitle(BView* view, BRect rect, BColumn* column, bool depressed)
 		drawRect = rect;
 		drawRect.InsetBy(2, 2);
 		if (depressed) {
-			backgroundColor = mix_color(
+			backgroundColor = ::mix_color(
 				fMasterView->Color(B_COLOR_HEADER_BACKGROUND),
 				make_color(0, 0, 0), 64);
-			bevelHigh = mix_color(backgroundColor, make_color(0, 0, 0), 64);
-			bevelLow = mix_color(backgroundColor, make_color(255, 255, 255),
+			bevelHigh = ::mix_color(backgroundColor, make_color(0, 0, 0), 64);
+			bevelLow = ::mix_color(backgroundColor, make_color(255, 255, 255),
 				128);
 			drawRect.left++;
 			drawRect.top++;
 		} else {
 			backgroundColor = fMasterView->Color(B_COLOR_HEADER_BACKGROUND);
-			bevelHigh = mix_color(backgroundColor, make_color(255, 255, 255),
+			bevelHigh = ::mix_color(backgroundColor, make_color(255, 255, 255),
 				192);
-			bevelLow = mix_color(backgroundColor, make_color(0, 0, 0), 64);
+			bevelLow = ::mix_color(backgroundColor, make_color(0, 0, 0), 64);
 			drawRect.bottom--;
 			drawRect.right--;
 		}
diff --git a/src/BoardWindow.cpp b/src/BoardWindow.cpp
index f28930e..cfdd70d 100644
--- a/src/BoardWindow.cpp
+++ b/src/BoardWindow.cpp
@@ -1096,9 +1096,9 @@ BoardWindow::_SaveSettings(void)
 {
     Settings settings("BoardWindow");
     settings
-        << "Split10"        << fSplitView->ItemWeight(0L)
+        << "Split10"        << fSplitView->ItemWeight((int32)0)
         << "Split11"        << fSplitView->ItemWeight(1L)
-        << "Split20"        << fMaterialSV->ItemWeight(0L)
+        << "Split20"        << fMaterialSV->ItemWeight((int32)0)
         << "Split21"        << fMaterialSV->ItemWeight(1L)
         << "Split22"        << fMaterialSV->ItemWeight(2L)
         << "EngineSkill"    << fSkillSlider->Value()
diff --git a/src/ChessBoardView.cpp b/src/ChessBoardView.cpp
index 158aa77..8fd0d86 100644
--- a/src/ChessBoardView.cpp
+++ b/src/ChessBoardView.cpp
@@ -68,7 +68,7 @@ ChessBoardView::ChessBoardView(BRect const& frame)
                                      
    	array<BString, 6> sounds = {{"newgame.ogg", "move.ogg", "castle.ogg",
                                      "capture.ogg", "illegal.ogg", "gong.ogg"}};
-
+#if 0
     for (unsigned int i = 0; i < sounds.size(); ++i) {
         fSound.push_back( new BSimpleGameSound(
                                         BString(tempPath).Append(sounds[i]) ) );
@@ -76,7 +76,9 @@ ChessBoardView::ChessBoardView(BRect const& frame)
         if (fSound.back()->InitCheck() != B_OK)
             fPlaySound = false;
     }
-
+#else
+	fPlaySound = false;
+#endif
     if (fPlaySound == false)
     	!out << "NO SOUND" << std::endl;
    	else
diff --git a/src/Debug.h b/src/Debug.h
index fdde1ed..bb6bb70 100644
--- a/src/Debug.h
+++ b/src/Debug.h
@@ -90,7 +90,7 @@ public:
         return( *this );
     }
 
-    Debug& operator<<(int32 number)
+    Debug& operator<<(long number)
     {
         fStr << number;
         return *this;
diff --git a/src/Engine.cpp b/src/Engine.cpp
index 4457ca0..8468137 100644
--- a/src/Engine.cpp
+++ b/src/Engine.cpp
@@ -36,7 +36,7 @@ Engine::Engine(BString name, uint32 replyCode, BLooper* targetLooper,
 	fTargetHandler = targetHandler;
 
 	fEngineName = name;
-	fEnginePath = Tools::AppPath().Append("/Engines/").Append( name );
+	fEnginePath = name;
 
     !out << "ENGINE-PATH:   " << fEnginePath << std::endl;
 
diff --git a/src/ICSMainWindow.cpp b/src/ICSMainWindow.cpp
index 7a8f827..da4a95a 100644
--- a/src/ICSMainWindow.cpp
+++ b/src/ICSMainWindow.cpp
@@ -265,7 +265,7 @@ ICSMainWindow::_ParseBlock(const char*& p1)
 
     if ((p2 = strchr(p1, BLOCK_END)) != NULL) {
           strncpy(str.LockBuffer(65356), p1, p2 - p1);
-          str[p2 - p1] = '\0';
+          str.SetByteAt(p2 - p1, '\0');
           str.UnlockBuffer();
           p1 = p2;
     } else {
@@ -615,13 +615,13 @@ ICSMainWindow::_SaveSettings(void)
 {
     Settings settings("ics_wnd");
     settings
-        << "Split10" << (float)fSplitView1->ItemWeight(0L)
+        << "Split10" << (float)fSplitView1->ItemWeight((int32)0)
         << "Split11" << (float)fSplitView1->ItemWeight(1L)
-        << "Split20" << (float)fSplitView2->ItemWeight(0L)
+        << "Split20" << (float)fSplitView2->ItemWeight((int32)0)
         << "Split21" << (float)fSplitView2->ItemWeight(1L)
-        << "Split30" << (float)fSplitView3->ItemWeight(0L)
+        << "Split30" << (float)fSplitView3->ItemWeight((int32)0)
         << "Split31" << (float)fSplitView3->ItemWeight(1L)
-        << "Split40" << (float)fSplitView4->ItemWeight(0L)
+        << "Split40" << (float)fSplitView4->ItemWeight((int32)0)
         << "Split41" << (float)fSplitView4->ItemWeight(1L)
         << std::endl;
 }
diff --git a/src/Jamfile b/src/Jamfile
index 86971b7..922e43f 100644
--- a/src/Jamfile
+++ b/src/Jamfile
@@ -1,13 +1,9 @@
-SubDir TOP source ;
+SubDir TOP src ;
 
 SEARCH_SOURCE += [ FDirName $(TOP) libs columnlistview ] ;
-SEARCH_SOURCE += [ FDirName $(TOP) source lib3ds ] ;
 
 DEFINES =  DEBUG=0 VERSION=0.4 ;
 C++FLAGS = -std=c++0x -fpermissive  -Wfatal-errors -fmax-errors=1 ;
-LINKFLAGS = -lstdc++ ;
-LINKLIBS += -L`finddir B_COMMON_LIB_DIRECTORY` ;
-LINKLIBS += -L$(TOP)/source/lib3ds ;
 
 Application Puri :
 	BackBoard.cpp
@@ -46,7 +42,7 @@ Application Puri :
 	SidebarView.cpp
 	TimeView.cpp
 	ToolBar.cpp
-	:	be $(TARGET_LIBSTDC++) png GL GLU glut 3ds 
+	:	be stdc++ png GL GLU glut 3ds
 		translation tracker game network
 		libcolumnlistview.a
 ;
-- 
2.11.0

