Merge branch 'master' of github.com:OoliteProject/oolite into zipped-oxp-support
Conflicts: GNUmakefile Merge upstream now or this will be messy later with the windows depsmaster
commit
d67bfb6c94
|
@ -7,9 +7,6 @@
|
|||
[submodule "deps/Linux-deps"]
|
||||
path = deps/Linux-deps
|
||||
url = ../oolite-linux-dependencies.git
|
||||
[submodule "deps/Windows-x86-deps"]
|
||||
path = deps/Windows-x86-deps
|
||||
url = ../oolite-windows-dependencies.git
|
||||
[submodule "tests"]
|
||||
path = tests
|
||||
url = ../oolite-tests.git
|
||||
|
@ -25,3 +22,6 @@
|
|||
[submodule "deps/libvorbis"]
|
||||
path = deps/libvorbis
|
||||
url = ../libvorbis-1.3.3.git
|
||||
[submodule "deps/Windows-deps"]
|
||||
path = deps/Windows-deps
|
||||
url = ../oolite-windows-dependencies.git
|
||||
|
|
19
GNUmakefile
19
GNUmakefile
|
@ -11,20 +11,29 @@ endif
|
|||
GNUSTEP_OBJ_DIR_BASENAME := $(GNUSTEP_OBJ_DIR_NAME)
|
||||
HOST_ARCH := $(shell echo $(GNUSTEP_HOST_CPU) | sed -e s/i.86/x86/ -e s/amd64/x86_64/ )
|
||||
ifeq ($(GNUSTEP_HOST_OS),mingw32)
|
||||
JS_INC_DIR = deps/Windows-x86-deps/JS32ECMAv5/include
|
||||
JS_LIB_DIR = deps/Windows-x86-deps/JS32ECMAv5/lib
|
||||
ifeq ($(GNUSTEP_HOST_CPU),x86_64)
|
||||
WIN_DEPS_DIR = deps/Windows-deps/x86_64
|
||||
else
|
||||
WIN_DEPS_DIR = deps/Windows-deps/x86
|
||||
endif
|
||||
JS_INC_DIR = $(WIN_DEPS_DIR)/JS32ECMAv5/include
|
||||
JS_LIB_DIR = $(WIN_DEPS_DIR)/JS32ECMAv5/lib
|
||||
ifeq ($(debug),yes)
|
||||
JS_IMPORT_LIBRARY = js32ECMAv5dbg
|
||||
else
|
||||
JS_IMPORT_LIBRARY = js32ECMAv5
|
||||
endif
|
||||
ADDITIONAL_INCLUDE_DIRS = -Ideps/Windows-x86-deps/include -I$(JS_INC_DIR) -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -Isrc/Core/Scripting -Isrc/Core/Materials -Isrc/Core/Entities -Isrc/Core/OXPVerifier -Isrc/Core/Debug -Isrc/Core/Tables -Isrc/Core/MiniZip
|
||||
ADDITIONAL_INCLUDE_DIRS = -I$(WIN_DEPS_DIR)/include -I$(JS_INC_DIR) -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -Isrc/Core/Scripting -Isrc/Core/Materials -Isrc/Core/Entities -Isrc/Core/OXPVerifier -Isrc/Core/Debug -Isrc/Core/Tables -Isrc/Core/MiniZip
|
||||
ADDITIONAL_OBJC_LIBS = -lglu32 -lopengl32 -lpng14.dll -lmingw32 -lSDLmain -lSDL -lSDL_mixer -lgnustep-base -l$(JS_IMPORT_LIBRARY) -lwinmm -mwindows
|
||||
ADDITIONAL_CFLAGS = -DWIN32 -DNEED_STRLCPY `sdl-config --cflags` -mtune=generic
|
||||
# note the vpath stuff above isn't working for me, so adding src/SDL and src/Core explicitly
|
||||
ADDITIONAL_OBJCFLAGS = -DLOADSAVEGUI -DWIN32 -DXP_WIN -Wno-import -std=gnu99 `sdl-config --cflags` -mtune=generic
|
||||
ADDITIONAL_LDFLAGS += -Wl,--large-address-aware
|
||||
oolite_LIB_DIRS += -L$(GNUSTEP_LOCAL_ROOT)/lib -Ldeps/Windows-x86-deps/lib -L$(JS_LIB_DIR)
|
||||
ifneq ($(GNUSTEP_HOST_CPU),x86_64)
|
||||
ADDITIONAL_LDFLAGS += -Wl,--large-address-aware
|
||||
else
|
||||
ADDITIONAL_LDFLAGS +=
|
||||
endif
|
||||
oolite_LIB_DIRS += -L$(GNUSTEP_LOCAL_ROOT)/lib -L$(WIN_DEPS_DIR)/lib -L$(JS_LIB_DIR)
|
||||
ifeq ($(ESPEAK),yes)
|
||||
ADDITIONAL_OBJC_LIBS += -lespeak.dll
|
||||
ADDITIONAL_OBJCFLAGS +=-DHAVE_LIBESPEAK=1
|
||||
|
|
|
@ -53,7 +53,11 @@ ifeq ($(debug),no)
|
|||
$(STRIP) $(PROGDIR)/$(DEST_BIN)
|
||||
endif
|
||||
ifeq ($(GNUSTEP_HOST_OS),mingw32)
|
||||
$(CP) $(CP_FLAGS) deps/Windows-x86-deps/DLLs/*.dll $(PROGDIR)
|
||||
ifeq ($(GNUSTEP_HOST_CPU),x86_64)
|
||||
$(CP) $(CP_FLAGS) deps/Windows-deps/x86_64/DLLs/*.dll $(PROGDIR)
|
||||
else
|
||||
$(CP) $(CP_FLAGS) deps/Windows-deps/x86/DLLs/*.dll $(PROGDIR)
|
||||
endif
|
||||
ifeq ($(debug),yes)
|
||||
$(RM) $(PROGDIR)/js32ECMAv5.dll
|
||||
else
|
||||
|
|
11
Makefile
11
Makefile
|
@ -33,8 +33,13 @@ pkg-debtest: DEB_REV := $(shell echo "0~test${DEB_REV}")
|
|||
pkg-debsnapshot: DEB_REV := $(shell echo "0~trunk${DEB_REV}")
|
||||
|
||||
ifeq ($(GNUSTEP_HOST_OS),mingw32)
|
||||
LIBJS = deps/Windows-x86-deps/DLLs/js32ECMAv5.dll
|
||||
LIBJS_DBG = deps/Windows-x86-deps/DLLs/js32ECMAv5.dll
|
||||
ifeq ($(GNUSTEP_HOST_CPU),x86_64)
|
||||
LIBJS = deps/Windows-deps/x86_64/DLLs/js32ECMAv5.dll
|
||||
LIBJS_DBG = deps/Windows-deps/x86_64/DLLs/js32ECMAv5.dll
|
||||
else
|
||||
LIBJS = deps/Windows-deps/x86/DLLs/js32ECMAv5.dll
|
||||
LIBJS_DBG = deps/Windows-deps/x86/DLLs/js32ECMAv5.dll
|
||||
endif
|
||||
DEPS = $(LIBJS)
|
||||
DEPS_DBG = $(LIBJS_DBG)
|
||||
else
|
||||
|
@ -185,7 +190,7 @@ pkg-debclean:
|
|||
|
||||
# And here are our Windows packager targets
|
||||
#
|
||||
NSIS="C:\Program Files\NSIS\makensis.exe"
|
||||
NSIS=/nsis/makensis.exe
|
||||
NSISVERSIONS=installers/win32/OoliteVersions.nsh
|
||||
|
||||
# Passing arguments cause problems with some versions of NSIS.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit df7d99d2a43cb9c42bc1f6690a025b7f54d6a5cf
|
||||
Subproject commit 48d21504174118c88ba18f2dc38ca66d828e019d
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
Subproject commit 8f30e266986dcee7bfb5dced20928f894b09e21c
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c62480fa254c839322bd190b59484b160a45739b
|
|
@ -653,7 +653,7 @@ MA 02110-1301, USA.
|
|||
BOOL allow_docking_thisship = allow_docking || !disallowed_docking_collides;
|
||||
// ships can physically dock here, and this routine is mainly for
|
||||
// collision detection, but will never be directed here by traffic
|
||||
// control, if allow_docking is false but d_d_c is true
|
||||
// control, if allow_docking is false but d_d_c is also false
|
||||
|
||||
StationEntity *station = (StationEntity *)[self parentEntity];
|
||||
if ([station status] == STATUS_DEAD)
|
||||
|
@ -676,8 +676,20 @@ MA 02110-1301, USA.
|
|||
GLfloat hh = port_dimensions.y;
|
||||
GLfloat dd = port_dimensions.z;
|
||||
|
||||
while (shipbb.max.x - shipbb.min.x > ww * 0.90) ww *= 1.25;
|
||||
while (shipbb.max.y - shipbb.min.y > hh * 0.90) hh *= 1.25;
|
||||
BOOL rotatedPort = (ww >= hh) ? NO : YES;
|
||||
BOOL rotatedShip = ((shipbb.max.x - shipbb.min.x) >= (shipbb.max.y - shipbb.min.y)) ? NO : YES;
|
||||
if (rotatedShip == rotatedPort)
|
||||
{
|
||||
// the ship and port are both bigger in x than y
|
||||
while (shipbb.max.x - shipbb.min.x > ww * 0.90) ww *= 1.25;
|
||||
while (shipbb.max.y - shipbb.min.y > hh * 0.90) hh *= 1.25;
|
||||
}
|
||||
else
|
||||
{
|
||||
// the ship and port have different x/y biggerness
|
||||
while (shipbb.max.x - shipbb.min.x > hh * 0.90) hh *= 1.25;
|
||||
while (shipbb.max.y - shipbb.min.y > ww * 0.90) ww *= 1.25;
|
||||
}
|
||||
|
||||
ww *= 0.5;
|
||||
hh *= 0.5;
|
||||
|
@ -743,7 +755,9 @@ MA 02110-1301, USA.
|
|||
|
||||
// if close enough (within 50%) correct and add damage
|
||||
//
|
||||
if ((arbb.min.x > -1.5 * ww)&&(arbb.max.x < 1.5 * ww)&&(arbb.min.y > -1.5 * hh)&&(arbb.max.y < 1.5 * hh))
|
||||
GLfloat safety = 1.0+(01.0/100.0);
|
||||
|
||||
if ((arbb.min.x > -safety * ww)&&(arbb.max.x < safety * ww)&&(arbb.min.y > -safety * hh)&&(arbb.max.y < safety * hh))
|
||||
{
|
||||
if (arbb.min.z < 0.0) // got our nose inside
|
||||
{
|
||||
|
|
|
@ -4129,16 +4129,22 @@ static const OOMatrix starboard_matrix =
|
|||
// HPVect: camera-relative position
|
||||
// OOGL(GLTranslateOOVector(vector_flip(position)));
|
||||
OOGL(glLightModelfv(GL_LIGHT_MODEL_AMBIENT, stars_ambient));
|
||||
// main light position, no shaders, in-flight / shaders, in-flight and docked.
|
||||
if (cachedSun)
|
||||
{
|
||||
[self setMainLightPosition:[cachedSun cameraRelativePosition]];
|
||||
}
|
||||
OOGL(glLightfv(GL_LIGHT1, GL_POSITION, main_light_position));
|
||||
}
|
||||
else
|
||||
{
|
||||
OOGL(glLightModelfv(GL_LIGHT_MODEL_AMBIENT, docked_light_ambient));
|
||||
// main_light_position no shaders, docked/GUI.
|
||||
OOGL(glLightfv(GL_LIGHT0, GL_POSITION, main_light_position));
|
||||
// main light position, no shaders, in-flight / shaders, in-flight and docked.
|
||||
OOGL(glLightfv(GL_LIGHT1, GL_POSITION, main_light_position));
|
||||
}
|
||||
|
||||
// main light position, no shaders, in-flight / shaders, in-flight and docked.
|
||||
OOGL(glLightfv(GL_LIGHT1, GL_POSITION, main_light_position));
|
||||
|
||||
OOGL([self useGUILightSource:demoShipMode]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue