diff --git a/Makefile b/Makefile index 0b154ede0..ffeb92167 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,8 @@ ifeq ($(PLAT),haiku) OBJECTS += $(BUILD_DIR)/Platform_BeOS.o $(BUILD_DIR)/Window_BeOS.o CFLAGS = -pipe -fno-math-errno LDFLAGS = -g - LIBS = -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker + LINK = $(CXX) + LIBS = -lGL -lnetwork -lbe -lgame -ltracker BUILD_DIR = build-haiku endif @@ -122,7 +123,8 @@ ifeq ($(PLAT),beos) OBJECTS += $(BUILD_DIR)/Platform_BeOS.o $(BUILD_DIR)/Window_BeOS.o CFLAGS = -pipe LDFLAGS = -g - LIBS = -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker + LINK = $(CXX) + LIBS = -lGL -lnetwork -lbe -lgame -ltracker BUILD_DIR = build-beos TRACK_DEPENDENCIES=0 endif diff --git a/readme.md b/readme.md index a21b4f23a..ce3a2dbac 100644 --- a/readme.md +++ b/readme.md @@ -360,14 +360,14 @@ Run `make saturn`. You'll need [libyaul](https://github.com/yaul-org/libyaul) 1. Install `gcc`, `haiku_devel`, `openal_devel` packages if needed 2. Run either: * `make haiku` or - * `cc -fno-math-errno src/*.c interop_BeOS.cpp -o ClassiCube -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker` + * `cc -fno-math-errno src/*.c src/*.cpp -o ClassiCube -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker` #### BeOS 1. Install a C compiler 2. Run either: * `make beos` or - * `cc -fno-math-errno src/*.c interop_BeOS.cpp -o ClassiCube -lGL -lbe -lgame -ltracker` + * `cc -fno-math-errno src/*.c src/*.cpp -o ClassiCube -lGL -lbe -lgame -ltracker` #### IRIX diff --git a/src/Platform_Posix.c b/src/Platform_Posix.c index fa139df50..32227c093 100644 --- a/src/Platform_Posix.c +++ b/src/Platform_Posix.c @@ -416,10 +416,10 @@ static void* ExecThread(void* param) { void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char* name) { pthread_t* ptr = (pthread_t*)Mem_Alloc(1, sizeof(pthread_t), "thread"); - int res; - *handle = ptr; - pthread_attr_t attrs; + int res; + + *handle = ptr; pthread_attr_init(&attrs); pthread_attr_setstacksize(&attrs, stackSize); diff --git a/src/Protocol.h b/src/Protocol.h index ccaa6e417..e71f5e701 100644 --- a/src/Protocol.h +++ b/src/Protocol.h @@ -67,7 +67,7 @@ extern struct IGameComponent Protocol_Component; void Protocol_Tick(void); extern cc_bool cpe_needD3Fix; -void Classic_SendChat(const cc_string* text, cc_bool partial);\ +void Classic_SendChat(const cc_string* text, cc_bool partial); void Classic_SendSetBlock(int x, int y, int z, cc_bool place, BlockID block); void Classic_SendLogin(void); void CPE_SendPlayerClick(int button, cc_bool pressed, cc_uint8 targetId, struct RayTracer* t); diff --git a/src/Window_BeOS.cpp b/src/Window_BeOS.cpp index ef9e7bcca..65478dcd6 100644 --- a/src/Window_BeOS.cpp +++ b/src/Window_BeOS.cpp @@ -196,7 +196,7 @@ static void UpdateMouseButtons(int buttons) { } static void HandleMouseMovement(BMessage* msg) { - int dx, dy; + int32 dx, dy; float prs; if (msg->FindInt32("be:delta_x", &dx) == B_OK &&