mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-14 01:59:09 +00:00
Compare commits
10 Commits
release/0.
...
0.4.7
Author | SHA1 | Date | |
---|---|---|---|
|
80c73b93ed | ||
|
8a74170da0 | ||
|
a0bf18c3c9 | ||
|
31b226dc9f | ||
|
b320aa40fa | ||
|
37835e9158 | ||
|
749a4f8c7d | ||
e72232dc4c | |||
|
45a4c69842 | ||
|
a2c882af6f |
22
Makefile
22
Makefile
@@ -109,7 +109,8 @@
|
||||
#
|
||||
# Special for crosscompiling there are some commands available:
|
||||
#
|
||||
# FAT_BINARY: builds a universal binary for OSX. Make sure you got both PPC and x86 libs. Only works with GCC 4 or newer
|
||||
# UNIVERSAL_BINARY: builds a universal binary for OSX. Make sure you got both PPC and x86 libs. Only works with GCC 4 or newer
|
||||
# TRIPLE_BINARY: builds a universal binary with the addition of code optimised for G5 (which means a total of 3 binaries in one file)
|
||||
#
|
||||
# JAGUAR: Crosscompiling for OSX 1.2.8 (codenamed Jaguar). Only works if OSX is defined too. Only works with GCC 4 or newer
|
||||
# This can be changed to any PPC version of OSX by changing the ppc flags in Makefile.config
|
||||
@@ -132,7 +133,7 @@
|
||||
|
||||
# Makefile version tag
|
||||
# it checks if the version tag in Makefile.config is the same and force update outdated config files
|
||||
MAKEFILE_VERSION:=8
|
||||
MAKEFILE_VERSION:=9
|
||||
|
||||
# CONFIG_WRITER has to be found even for manual configuration
|
||||
CONFIG_WRITER=makefiledir/Makefile.config_writer
|
||||
@@ -267,7 +268,7 @@ ENDIAN_CHECK=endian_check$(EXE)
|
||||
STRGEN=strgen/strgen$(EXE)
|
||||
OSXAPP="OpenTTD.app"
|
||||
|
||||
REV := 0.4.6-$(shell if test -d .svn; then svnversion . | awk '{ print "r"$$0 }'; fi)
|
||||
REV := 0.4.7
|
||||
|
||||
# MorphOS needs builddate
|
||||
BUILDDATE=`date +%d.%m.%y`
|
||||
@@ -340,6 +341,11 @@ endif
|
||||
ifdef OSX
|
||||
# these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer
|
||||
BASECFLAGS += -O3 -funroll-loops -fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-jumps-max-skip=15 -falign-loops-max-skip=15 -mdynamic-no-pic
|
||||
ifdef IS_G5
|
||||
ifndef UNIVERSAL_BINARY
|
||||
BASECFLAGS += $(G5_FLAGS)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifdef MORPHOS
|
||||
BASECFLAGS += -I/gg/os-include -O2 -noixemul -fstrict-aliasing -fexpensive-optimizations
|
||||
@@ -994,17 +1000,21 @@ endif
|
||||
$(Q)$(CC) $(OBJCFLAGS) $(CDEFS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:.deps/%.d=%.o):#' > $@
|
||||
|
||||
|
||||
ifndef TRIPLE_BINARY
|
||||
# building tripple binary object files is handled in os/macosx/Makefile
|
||||
# TARGET_CPU_FLAGS is used to set target CPUs in OSX universal binaries. It's empty for all other builds
|
||||
%.o: %.c $(MAKE_CONFIG)
|
||||
@echo '===> Compiling $<'
|
||||
$(Q)$(CC) $(CFLAGS) $(CDEFS) -c -o $@ $<
|
||||
$(Q)$(CC) $(TARGET_CPU_FLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $<
|
||||
|
||||
%.o: %.cpp $(MAKE_CONFIG)
|
||||
@echo '===> Compiling $<'
|
||||
$(Q)$(CXX) $(CFLAGS) $(CDEFS) -c -o $@ $<
|
||||
$(Q)$(CXX) $(TARGET_CPU_FLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $<
|
||||
|
||||
%.o: %.m $(MAKE_CONFIG)
|
||||
@echo '===> Compiling $<'
|
||||
$(Q)$(CC) $(CFLAGS) $(CDEFS) -c -o $@ $<
|
||||
$(Q)$(CC) $(TARGET_CPU_FLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $<
|
||||
endif
|
||||
|
||||
%.o: %.rc
|
||||
@echo '===> Compiling resource $<'
|
||||
|
@@ -1,4 +1,12 @@
|
||||
t 0.4.6 (2006-03-22)
|
||||
0.4.7 (2006-03-26)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
- Feature: [OSX] Add support for triple-binaries (PPC, PPC970, i386) (r4102)
|
||||
- Fix: [OSX] crash when going to fullscreen (r4100)
|
||||
- Fix: Allow unused wagons to have their first cache set. Fixes faulty cache-warning message and noticably speeds up depot operations (r4094)
|
||||
- Fix: [NPF] Trains & busses were unable to find a route when leaving a depot or bus stop. (r4072)
|
||||
|
||||
0.4.6 (2006-03-22)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
- Codechange: [win32] Show the revision in crash.txt and enable the button to show the crash text in the crash-window (r3965)
|
||||
|
10
docs/OSX_why_multiple_applications.txt
Normal file
10
docs/OSX_why_multiple_applications.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
There are currently two different downloads for OSX, one is named osx, while the other one is named osx-jaguar
|
||||
|
||||
The reason for this is that Apple added more functionality to 10.3 and to make use of that, it will no longer run on OSX 10.2 (codenamed Jaguar). To make the game useable on Jaguar, then a special download is available, but it will miss the bugfixes/features, that relies on newer functionality.
|
||||
|
||||
The general download is a universal binary and should work great on all macs using 10.3.9 or newer, no matter what processor it got. You should at all time avoid the Jaguar Build if possible.
|
||||
|
||||
Technically the universal binary is a triple binary because it contains code for 3 CPUs and the CPUs in question are PPC (G3+G4), G5 and Intel. The Jaguar build is only optimised for PPC and other (newer) CPUs will not benefit so much from their advanced features. This is another reason to avoid the Jaguar build. It's generally slower on modern CPUs.
|
||||
|
||||
Current list of missing features in the Jaguar build:
|
||||
-Can't save screenshots or savegames if certain chars are in the filename. This mainly applies to European chars and hits German hard as the month Mär (Mar) can't be saved
|
@@ -1,36 +0,0 @@
|
||||
Since you are reading this, OpenTTD have crashed. This file tells you how
|
||||
to fix the most common problems or make to make a bug report, that the
|
||||
developers can use to track down the problem
|
||||
|
||||
If it is an assert, OpenTTD will open the console for you, if it is truly a crash, you have to do it yourself. The Console is located at /Applications/Utilities/Console.
|
||||
The problem is near the button of the page
|
||||
|
||||
The problems are as follows:
|
||||
NOTE: build from source means to download the source and compile
|
||||
yourself. If you get one of the build from source error with the version
|
||||
that is downloaded on a dmg file, you should make a bug report
|
||||
|
||||
--Didn't find a needed file:
|
||||
you just give it the file it asks for. It even tells you what
|
||||
folder it wants it in
|
||||
most common version of this problem is "Error: Cannot open file
|
||||
'data/sample.cat'"
|
||||
if you get that one, that means that you haven't got all the
|
||||
needed files from the WINDOWS version of TTD
|
||||
or if you build from source,
|
||||
|
||||
--Error: No available language packs
|
||||
you need at least one .lng file in your lang folder. This applies
|
||||
only to people who build from source
|
||||
|
||||
--spritecache.c:237: failed assertion `b'
|
||||
you got an outdated grf file. Update from the data folder in the
|
||||
source. This applies only to people, who build from source
|
||||
|
||||
--assertion error that are not triggered by one of the errors listed in
|
||||
this file:
|
||||
you most likely found a bug. Write down the assertion and try to
|
||||
see if you can reproduce it. If you can, make a
|
||||
savegame from just before it happens (autosaves are useful here)
|
||||
and post a bugreport with it on sourceforge
|
||||
Write what you did to trigger the bug and what assertion it made
|
@@ -1,6 +1,6 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.Dd March 22, 2006
|
||||
.Dd March 26, 2006
|
||||
.Dt OPENTTD 6
|
||||
.Sh NAME
|
||||
.Nm openttd
|
||||
|
@@ -15,7 +15,7 @@ or http://bugs.openttd.org.
|
||||
If the bug report is closed, it has been fixed, which then can be verified
|
||||
in the latest SVN version.
|
||||
|
||||
Bugs for 0.4.6
|
||||
Bugs for 0.4.7
|
||||
------------------------------------------------------------------------
|
||||
URL: http://bugs.openttd.org
|
||||
|
||||
@@ -42,10 +42,10 @@ URL: http://bugs.openttd.org
|
||||
------------------------------------------------------------------------
|
||||
URL: http://sourceforge.net/tracker/?atid=636365&group_id=103924&func=browse
|
||||
|
||||
-1458368 Ships cannot be sent to depot when loading with NPF on, transfer not working
|
||||
-1454591 Street junctions not able to converted
|
||||
-1453676 crash in windowed mode when moving mouse back to openttd
|
||||
-1436419 Vehicles profits gone negitive.......bug
|
||||
-1438411 Game crash with NPF (r3663)
|
||||
-1434000 Error in Transfer-Function
|
||||
-1433315 non-existant crash reporting
|
||||
-1432871 Wrong signalstate when track over track
|
||||
@@ -77,7 +77,7 @@ URL: http://sourceforge.net/tracker/?atid=636365&group_id=103924&func=browse
|
||||
-1106356 re-offered prototypes
|
||||
-1085486 Subsidies: Only count when station is in right suburb
|
||||
|
||||
Minor Bugs for 0.4.5.1
|
||||
Minor Bugs for 0.4.7
|
||||
------------------------------------------------------------------------
|
||||
URL: http://sourceforge.net/tracker/?atid=669662&group_id=103924&func=browse
|
||||
|
||||
|
@@ -87,25 +87,13 @@ $(MAKE_CONFIG):
|
||||
|
||||
$(call CONFIG_LINE,\# Universal binary setup)
|
||||
$(call CONFIG_LINE,\# use these settings for building universal binaries. Most systems should work with the default settings)
|
||||
$(call CONFIG_LINE,SDL_PPC_CONFIG:=$(SDL_PPC_CONFIG))
|
||||
$(call CONFIG_LINE,SDL_x86_CONFIG:=$(SDL_x86_CONFIG))
|
||||
$(call CONFIG_LINE,CFLAGS_UNIVERSAL:=$(CFLAGS_UNIVERSAL))
|
||||
$(call CONFIG_LINE,LDFLAGS_UNIVERSAL:=$(LDFLAGS_UNIVERSAL))
|
||||
|
||||
$(call CONFIG_LINE,\# if you got a fat libpng you should not need to change this. It is recommended to get a fat libpng lib)
|
||||
$(call CONFIG_LINE,LIBPNG_PPC_CONFIG:=$(LIBPNG_PPC_CONFIG))
|
||||
$(call CONFIG_LINE,LIBPNG_x86_CONFIG:=$(LIBPNG_x86_CONFIG))
|
||||
|
||||
$(call CONFIG_LINE,\# autodetected SDL lib path, but it is not detected in a reliable way, so verify it. It needs to be the x86 lib)
|
||||
$(call CONFIG_LINE,x86_SDL_LIB:=$(x86_SDL_LIB))
|
||||
|
||||
$(call CONFIG_LINE,\# default values should be good enough for the rest of the universal binary flags, but check them anyway)
|
||||
$(call CONFIG_LINE,SKIP_LIB_TEST:=$(SKIP_LIB_TEST))
|
||||
$(call CONFIG_LINE,PPC_CC:=$(PPC_CC))
|
||||
$(call CONFIG_LINE,CFLAGS_PPC:=$(CFLAGS_PPC))
|
||||
$(call CONFIG_LINE,LDFLAGS_PPC:=$(LDFLAGS_PPC))
|
||||
|
||||
$(call CONFIG_LINE,x86_CC:=$(x86_CC))
|
||||
$(call CONFIG_LINE,CFLAGS_x86:=$(CFLAGS_x86))
|
||||
$(call CONFIG_LINE,LDFLAGS_x86:=$(LDFLAGS_x86))
|
||||
$(call CONFIG_LINE,CFLAGS_JAGUAR:=$(CFLAGS_JAGUAR))
|
||||
$(call CONFIG_LINE,LDFLAGS_JAGUAR:=$(LDFLAGS_JAGUAR))
|
||||
$(call CONFIG_LINE,)
|
||||
$(call CONFIG_LINE,G5_FLAGS:=$(G5_FLAGS))
|
||||
$(call CONFIG_LINE,)
|
||||
|
||||
$(call CONFIG_LINE,\# For cross-compiling)
|
||||
|
@@ -15,7 +15,7 @@
|
||||
extern const char _openttd_revision[];
|
||||
#elif defined(WITH_REV_HACK)
|
||||
#define WITH_REV
|
||||
const char _openttd_revision[] = WITH_REV_HACK;
|
||||
const char _openttd_revision[] = "0.4.7";
|
||||
#else
|
||||
const char _openttd_revision[] = NOREV_STRING;
|
||||
#endif
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#ifndef NETWORK_H
|
||||
#define NETWORK_H
|
||||
|
||||
#define NOREV_STRING "0.4.6-norev000"
|
||||
#define NOREV_STRING "0.4.7-norev000"
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
|
||||
|
2
npf.c
2
npf.c
@@ -548,6 +548,8 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
|
||||
} else {
|
||||
dst_tile = INVALID_TILE; /* Road vehicle heading inwards: dead end */
|
||||
}
|
||||
} else {
|
||||
dst_tile = AddTileIndexDiffCWrap(src_tile, TileIndexDiffCByDir(exitdir));
|
||||
}
|
||||
} else {
|
||||
/* This a normal tile, a bridge, a tunnel exit, etc. */
|
||||
|
@@ -42,7 +42,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /Gr /Zp4 /MT /W3 /Zi /Ox /Oa /Ow /Og /Oi /Os /Gf /Gy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32_EXCEPTION_TRACKER" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /D "WITH_PNG" /D "WITH_ZLIB" /D "ENABLE_NETWORK" /FAcs /FR /Yu"stdafx.h" /J /FD /c
|
||||
# ADD CPP /nologo /Gr /Zp4 /MT /W3 /Zi /Ox /Oa /Ow /Og /Oi /Os /Gf /Gy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32_EXCEPTION_TRACKER" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /D "WITH_PNG" /D "WITH_ZLIB" /D "ENABLE_NETWORK" /D "WITH_REV_HACK" /FAcs /FR /Yu"stdafx.h" /J /FD /c
|
||||
# SUBTRACT CPP /WX /Ot
|
||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||
@@ -68,7 +68,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WITH_PNG" /D "WITH_ZLIB" /D "ENABLE_NETWORK" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /YX"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WITH_PNG" /D "WITH_ZLIB" /D "ENABLE_NETWORK" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /D "WITH_REV_HACK" /YX"stdafx.h" /FD /GZ /c
|
||||
# SUBTRACT CPP /WX /Fr
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||
|
@@ -28,7 +28,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;ENABLE_NETWORK"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;ENABLE_NETWORK;WITH_REV_HACK"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
@@ -100,7 +100,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;ENABLE_NETWORK"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;ENABLE_NETWORK;WITH_REV_HACK"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
openttd (0.4.6-1) unstable; urgency=low
|
||||
openttd (0.4.7-1) unstable; urgency=low
|
||||
|
||||
* Remove old terminal messages and make sure that debconf is always called.
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
%define name openttd
|
||||
%define version 0.4.6
|
||||
%define version 0.4.7
|
||||
%define release 1mdk
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
29
os/macosx/G5_detector.c
Normal file
29
os/macosx/G5_detector.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include <mach/mach.h>
|
||||
#include <mach/mach_host.h>
|
||||
#include <mach/host_info.h>
|
||||
#include <mach/machine.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#ifndef CPU_SUBTYPE_POWERPC_970
|
||||
#define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100)
|
||||
#endif
|
||||
|
||||
// this function is a lightly modified version of some code from Apple's developer homepage to detect G5 CPUs at runtime
|
||||
main()
|
||||
{
|
||||
host_basic_info_data_t hostInfo;
|
||||
mach_msg_type_number_t infoCount;
|
||||
boolean_t is_G5;
|
||||
|
||||
infoCount = HOST_BASIC_INFO_COUNT;
|
||||
host_info(mach_host_self(), HOST_BASIC_INFO,
|
||||
(host_info_t)&hostInfo, &infoCount);
|
||||
|
||||
is_G5 = ((hostInfo.cpu_type == CPU_TYPE_POWERPC) &&
|
||||
(hostInfo.cpu_subtype == CPU_SUBTYPE_POWERPC_970));
|
||||
if (is_G5)
|
||||
printf("1");
|
||||
}
|
@@ -2,36 +2,47 @@
|
||||
# This makefile is not a standalone makefile, but is called from the general one
|
||||
# it contains targets specific to MacOS X
|
||||
|
||||
ifdef FAT_BINARY
|
||||
FAT_BINARY:=build_universal_binary
|
||||
ifdef TRIPLE_BINARY
|
||||
# this is to add G5_FLAGS to ppc970 builds only. If the ability to add flags to a single arch only shows up in the future
|
||||
# we can get rid of this. Xcode supports arch dependant flags, but we can't do it in the makefile (yet?)
|
||||
%.o: %.c $(MAKE_CONFIG)
|
||||
@echo '===> Compiling $<'
|
||||
$(Q)$(CC) $(CFLAGS) $(CDEFS) -arch ppc -c -arch i386 -o $@.uni $<
|
||||
$(Q)$(CC) $(CFLAGS) $(CDEFS) $(G5_FLAGS) -arch ppc970 -c -o $@.ppc970 $<
|
||||
$(Q)lipo -create -output $@ $@.uni $@.ppc970
|
||||
$(Q)rm $@.uni $@.ppc970
|
||||
|
||||
%.o: %.cpp $(MAKE_CONFIG)
|
||||
@echo '===> Compiling $<'
|
||||
$(Q)$(CXX) $(CFLAGS) $(CDEFS) -arch ppc -arch i386 -c -o $@.uni $<
|
||||
$(Q)$(CXX) $(CFLAGS) $(CDEFS) $(G5_FLAGS) -arch ppc970 -c -o $@.ppc970 $<
|
||||
$(Q)lipo -create -output $@ $@.uni $@.ppc970
|
||||
$(Q)rm $@.uni $@.ppc970
|
||||
|
||||
%.o: %.m $(MAKE_CONFIG)
|
||||
@echo '===> Compiling $<'
|
||||
$(Q)$(CC) $(CFLAGS) $(CDEFS) -arch ppc -arch i386 -c -o $@.uni $<
|
||||
$(Q)$(CC) $(CFLAGS) $(CDEFS) -arch ppc970 $(G5_FLAGS) -c -o $@.ppc970 $<
|
||||
$(Q)lipo -create -output $@ $@.uni $@.ppc970
|
||||
$(Q)rm $@.uni $@.ppc970
|
||||
endif
|
||||
|
||||
ifdef UNIVERSAL_x86_PART
|
||||
ifdef UNIVERSAL_PPC_PART
|
||||
# the bundle is build by the PPC compile when making universal binaries
|
||||
BUILD_OSX_BUNDLE:=
|
||||
else
|
||||
BUILD_OSX_BUNDLE:=build_OSX_bundle
|
||||
endif
|
||||
|
||||
# building an universal binary
|
||||
# since we can only compile for PPC or x86 at any one time, we compile one and then
|
||||
# we make clean and compile the other one. In the end we use lipo to join them together
|
||||
# when this is done, we can continue with the targets from the first run, which is build_OSX_bundle
|
||||
|
||||
$(FAT_BINARY): $(TTD)
|
||||
$(Q)mkdir -p temp_binary_dir
|
||||
$(Q)cp $(TTD) temp_binary_dir/$(TTD)_a
|
||||
$(Q)rm -rf $(TTD) $(OBJS) # delete all .o files so we can compile for a new endian
|
||||
$(Q)make UNIVERSAL_x86_PART:=1
|
||||
$(Q)cp $(TTD) temp_binary_dir/$(TTD)_b
|
||||
@echo '===> Joining the PPC and x86 binaries into one universal one'
|
||||
$(Q)lipo temp_binary_dir/$(TTD)_a temp_binary_dir/$(TTD)_b -create -output $(TTD)
|
||||
$(Q)rm -rf temp_binary_dir
|
||||
ifdef JAGUAR
|
||||
JAGUAR_POSTFIX := -jaguar
|
||||
endif
|
||||
|
||||
# build the bundle. OSX wants to keep apps in bundles, so we will give it one
|
||||
# the good thing about bundles is that you can keep extra files in them, so we keep lng files and a data dir in it
|
||||
|
||||
$(BUILD_OSX_BUNDLE): $(TTD) $(FAT_BINARY)
|
||||
$(BUILD_OSX_BUNDLE): $(TTD)
|
||||
@echo '===> Building application bundle'
|
||||
$(Q)rm -fr "$(OSXAPP)"
|
||||
$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS
|
||||
@@ -48,23 +59,23 @@ $(BUILD_OSX_BUNDLE): $(TTD) $(FAT_BINARY)
|
||||
|
||||
# make the release disk image. Should only be used with releases and is a good and fast way to make sure to remember all the needed files
|
||||
release: all
|
||||
$(Q)mkdir -p "OpenTTD $(RELEASE)"
|
||||
$(Q)mkdir -p "OpenTTD $(RELEASE)"/docs
|
||||
$(Q)mkdir -p "OpenTTD $(RELEASE)"/scenario
|
||||
$(Q)cp -R $(OSXAPP) "OpenTTD $(RELEASE)"/
|
||||
$(Q)cp docs/OSX_install_instructions.txt "OpenTTD $(RELEASE)"/How\ to\ install\ (please\ read).txt
|
||||
$(Q)cp readme.txt "OpenTTD $(RELEASE)"/docs/
|
||||
$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD $(RELEASE)"/docs/readme\ if\ crashed\ on\ OSX.txt
|
||||
$(Q)cp docs/console.txt "OpenTTD $(RELEASE)"/docs/
|
||||
$(Q)cp COPYING "OpenTTD $(RELEASE)"/docs/
|
||||
$(Q)cp changelog.txt "OpenTTD $(RELEASE)"/docs/
|
||||
$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD $(RELEASE)"/docs/
|
||||
$(Q)cp os/macosx/*.webloc "OpenTTD $(RELEASE)"
|
||||
$(Q)cp known-bugs.txt "OpenTTD $(RELEASE)"/known-bugs.txt
|
||||
$(Q)cp scenario/* "OpenTTD $(RELEASE)"/scenario/
|
||||
$(Q)/usr/bin/hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(RELEASE)" openttd-"$(RELEASE)"-osx.dmg
|
||||
$(Q)rm -fr "OpenTTD $(RELEASE)"
|
||||
@echo '===> Building release disk image'
|
||||
$(Q)mkdir -p "OpenTTD $(REV)"
|
||||
$(Q)mkdir -p "OpenTTD $(REV)/docs"
|
||||
$(Q)mkdir -p "OpenTTD $(REV)/scenario"
|
||||
$(Q)cp -R $(OSXAPP) "OpenTTD $(REV)/"
|
||||
$(Q)cp docs/OSX_install_instructions.txt "OpenTTD $(REV)/How to install (please read).txt"
|
||||
$(Q)cp docs/OSX_why_multiple_applications.txt "OpenTTD $(REV)/why a special Jaguar download.txt"
|
||||
$(Q)cp readme.txt "OpenTTD $(REV)/docs/"
|
||||
$(Q)cp docs/console.txt "OpenTTD $(REV)/docs/"
|
||||
$(Q)cp COPYING "OpenTTD $(REV)/docs/"
|
||||
$(Q)cp changelog.txt "OpenTTD $(REV)/docs/"
|
||||
$(Q)cp os/macosx/*.webloc "OpenTTD $(REV)"
|
||||
$(Q)cp known-bugs.txt "OpenTTD $(REV)/known-bugs.txt"
|
||||
$(Q)cp scenario/* "OpenTTD $(REV)/scenario/"
|
||||
$(Q)/usr/bin/hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(REV)" openttd-"$(REV)"-osx"$(JAGUAR_POSTFIX)".dmg
|
||||
$(Q)rm -fr "OpenTTD $(REV)"
|
||||
|
||||
$(OSX): $(TTD) $(BUILD_OSX_BUNDLE)
|
||||
|
||||
.PHONY: release $(BUILD_OSX_BUNDLE) $(FAT_BINARY)
|
||||
.PHONY: release $(BUILD_OSX_BUNDLE) $(UNIVERSAL_BINARY)
|
||||
|
@@ -11,12 +11,29 @@ endif
|
||||
endif
|
||||
|
||||
ifdef RELEASE
|
||||
ifndef FAT_BINARY
|
||||
ifndef UNIVERSAL_BINARY
|
||||
$(warning Compiling a release build, that is not a universal binary)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef FAT_BINARY
|
||||
ifdef TRIPLE_BINARY
|
||||
ifdef DEBUG
|
||||
$(error no G5 optimisation is made in debug builds, so tripple binaries aren't possible. Use UNIVERSAL_BINARY instead if you really want a universal debug build)
|
||||
endif
|
||||
UNIVERSAL_BINARY:=1
|
||||
endif
|
||||
|
||||
ifndef UNIVERSAL_BINARY
|
||||
ifndef JAGUAR
|
||||
ifeq ($(shell uname), Darwin)
|
||||
# it's a hardware mac, not crosscompiling
|
||||
$(shell $(CC) os/macosx/G5_detector.c -o os/macosx/G5_detector)
|
||||
IS_G5:=$(shell os/macosx/G5_detector)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef UNIVERSAL_BINARY
|
||||
ifndef STATIC
|
||||
$(warning Compiling a universal binary, that is not static. Adding static flag)
|
||||
STATIC:=1
|
||||
@@ -30,83 +47,36 @@ endif
|
||||
endif
|
||||
|
||||
# setup flags if none are defined
|
||||
ifndef CFLAGS_PPC
|
||||
CFLAGS_PPC:= -isysroot /Developer/SDKs/MacOSX10.2.8.sdk
|
||||
ifndef CFLAGS_JAGUAR
|
||||
CFLAGS_JAGUAR:= -isysroot /Developer/SDKs/MacOSX10.2.8.sdk
|
||||
endif
|
||||
ifndef LDFLAGS_PPC
|
||||
LDFLAGS_PPC:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk
|
||||
ifndef LDFLAGS_JAGUAR
|
||||
LDFLAGS_JAGUAR:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk
|
||||
endif
|
||||
ifndef PPC_CC
|
||||
PPC_CC:=powerpc-apple-darwin8-gcc-4.0.0
|
||||
|
||||
ifndef CFLAGS_UNIVERSAL
|
||||
CFLAGS_UNIVERSAL:= -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
||||
endif
|
||||
ifndef CFLAGS_x86
|
||||
CFLAGS_x86:= -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
||||
endif
|
||||
ifndef LDFLAGS_x86
|
||||
LDFLAGS_x86:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
|
||||
endif
|
||||
ifndef x86_CC
|
||||
x86_CC:=i686-apple-darwin8-gcc-4.0.0
|
||||
endif
|
||||
ifdef WITH_PNG
|
||||
ifndef LIBPNG_PPC_CONFIG
|
||||
LIBPNG_PPC_CONFIG:=$(LIBPNG-CONFIG)
|
||||
endif
|
||||
ifndef LIBPNG_x86_CONFIG
|
||||
LIBPNG_x86_CONFIG:=$(LIBPNG-CONFIG)
|
||||
endif
|
||||
endif
|
||||
ifdef WITH_SDL
|
||||
ifndef SDL_PPC_CONFIG
|
||||
SDL_PPC_CONFIG:=$(SDL-CONFIG)
|
||||
endif
|
||||
ifndef SDL_x86_CONFIG
|
||||
SDL_x86_CONFIG:=$(SDL-CONFIG)
|
||||
endif
|
||||
ifndef x86_SDL_LIB
|
||||
x86_SDL_LIB:=$(shell echo "`$(SDL_x86_CONFIG) --prefix`/lib/libSDL-1.2.0.dylib")
|
||||
endif
|
||||
ifndef LDFLAGS_UNIVERSAL
|
||||
LDFLAGS_UNIVERSAL:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
|
||||
endif
|
||||
|
||||
ifdef JAGUAR
|
||||
LIBPNG-CONFIG:=$(LIBPNG_PPC_CONFIG)
|
||||
SDL-CONFIG:=$(SDL_PPC_CONFIG)
|
||||
CC_TARGET:=$(PPC_CC)
|
||||
CFLAGS:= $(CFLAGS_PPC) -arch ppc
|
||||
LDFLAGS:= $(LDFLAGS_PPC)
|
||||
CFLAGS:= $(CFLAGS_JAGUAR) -arch ppc
|
||||
LDFLAGS:= $(LDFLAGS_JAGUAR)
|
||||
endif
|
||||
|
||||
ifdef FAT_BINARY
|
||||
# set up config files
|
||||
ifndef SKIP_LIB_TEST
|
||||
ifdef WITH_PNG
|
||||
TEST:=$(shell lipo -info `$(LIBPNG_PPC_CONFIG) --prefix`/lib/libpng.a | xargs -n 1 | grep "ppc"))
|
||||
ifndef TEST
|
||||
$(error no PPC libpng found)
|
||||
endif
|
||||
TEST:=$(shell lipo -info `$(LIBPNG_x86_CONFIG) --prefix`/lib/libpng.a | xargs -n 1 | grep "i386"))
|
||||
ifndef TEST
|
||||
$(error no x86 libpng found)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifndef G5_FLAGS
|
||||
G5_FLAGS := -mtune=970 -mcpu=970 -mpowerpc-gpopt
|
||||
endif
|
||||
|
||||
ifdef UNIVERSAL_x86_PART
|
||||
LIBPNG-CONFIG:=$(LIBPNG_x86_CONFIG)
|
||||
SDL-CONFIG:=$(SDL_x86_CONFIG)
|
||||
CC_TARGET:=$(x86_CC)
|
||||
# clear the cached list of PPC libs
|
||||
LIBS:=
|
||||
OBJS:=
|
||||
CFLAGS:= $(CFLAGS_x86) -arch i386
|
||||
LDFLAGS:= $(LDFLAGS_x86)
|
||||
else
|
||||
LIBPNG-CONFIG:=$(LIBPNG_PPC_CONFIG)
|
||||
SDL-CONFIG:=$(SDL_PPC_CONFIG)
|
||||
CC_TARGET:=$(PPC_CC)
|
||||
CFLAGS:= $(CFLAGS_PPC) -arch ppc
|
||||
LDFLAGS:= $(LDFLAGS_PPC)
|
||||
endif
|
||||
ifdef UNIVERSAL_BINARY
|
||||
TARGET_CPU_FLAGS:= -arch ppc -arch i386
|
||||
LDFLAGS := $(LDFLAGS_UNIVERSAL) -arch ppc -arch i386
|
||||
CFLAGS += $(CFLAGS_UNIVERSAL)
|
||||
ifdef TRIPLE_BINARY
|
||||
LDFLAGS += -arch ppc970
|
||||
endif
|
||||
endif
|
||||
|
||||
# setting up flags to make a binary, that fits the system it builds on
|
||||
|
@@ -1,8 +1,8 @@
|
||||
; Define your application name
|
||||
!define APPNAME "OpenTTD"
|
||||
!define APPNAMEANDVERSION "OpenTTD 0.4.6.0"
|
||||
!define APPVERSION "0.4.6.0"
|
||||
!define INSTALLERVERSION 18 ;NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
!define APPNAMEANDVERSION "OpenTTD 0.4.7.0"
|
||||
!define APPVERSION "0.4.7.0"
|
||||
!define INSTALLERVERSION 19 ;NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
!define MUI_ICON "..\..\..\openttd.ico"
|
||||
!define MUI_UNICON "..\..\..\openttd.ico"
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
|
||||
|
@@ -61,8 +61,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,4,6,0
|
||||
PRODUCTVERSION 0,4,6,0
|
||||
FILEVERSION 0,4,7,0
|
||||
PRODUCTVERSION 0,4,7,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -80,7 +80,7 @@ BEGIN
|
||||
VALUE "Comments", "This program is licensed under the GNU General Public License.\0"
|
||||
VALUE "CompanyName", "OpenTTD Development Team\0"
|
||||
VALUE "FileDescription", "OpenTTD\0"
|
||||
VALUE "FileVersion", "0.4.6.0\0"
|
||||
VALUE "FileVersion", "0.4.7.0\0"
|
||||
VALUE "InternalName", "openttd\0"
|
||||
VALUE "LegalCopyright", "Copyright <20> OpenTTD Developers 2002-2006. All Rights Reserved.\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
OpenTTD README
|
||||
Last updated: 2006-03-22
|
||||
Release version: 0.4.6
|
||||
Last updated: 2006-03-26
|
||||
Release version: 0.4.7
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
3
stdafx.h
3
stdafx.h
@@ -265,6 +265,9 @@ assert_compile(sizeof(uint8) == 1);
|
||||
# define DrawString OTTD_DrawString
|
||||
# define Random OTTD_Random
|
||||
# define CloseConnection OTTD_CloseConnection
|
||||
|
||||
// enable the preprocessor to tell the difference between different OSX versions
|
||||
# include <AvailabilityMacros.h>
|
||||
#endif /* __APPLE */
|
||||
|
||||
#ifdef __AMIGA__
|
||||
|
@@ -505,7 +505,7 @@ Vehicle *GetFirstVehicleInChain(const Vehicle *v)
|
||||
assert(v != NULL);
|
||||
|
||||
if (v->first != NULL) {
|
||||
if (IsFrontEngine(v->first)) return v->first;
|
||||
if (IsFrontEngine(v->first) || IsFreeWagon(v->first)) return v->first;
|
||||
|
||||
DEBUG(misc, 0) ("v->first cache faulty. We shouldn't be here, rebuilding cache!");
|
||||
}
|
||||
@@ -519,7 +519,7 @@ Vehicle *GetFirstVehicleInChain(const Vehicle *v)
|
||||
while ((u = GetPrevVehicleInChain_bruteforce(v)) != NULL) v = u;
|
||||
|
||||
/* Set the first pointer of all vehicles in that chain to the first wagon */
|
||||
if (IsFrontEngine(v))
|
||||
if (IsFrontEngine(v) || IsFreeWagon(v))
|
||||
for (u = (Vehicle *)v; u != NULL; u = u->next) u->first = (Vehicle *)v;
|
||||
|
||||
return (Vehicle*)v;
|
||||
|
@@ -1507,54 +1507,41 @@ static void QZ_DrawScreen(void)
|
||||
uint width;
|
||||
uint pitch;
|
||||
uint y;
|
||||
uint num_dirty_rects;
|
||||
uint length_drawn;
|
||||
uint left;
|
||||
uint i;
|
||||
|
||||
src = _cocoa_video_data.pixels;
|
||||
dst = (uint8*)_cocoa_video_data.realpixels;
|
||||
width = _cocoa_video_data.width;
|
||||
pitch = _cocoa_video_data.pitch;
|
||||
num_dirty_rects = _cocoa_video_data.num_dirty_rects;
|
||||
|
||||
#ifdef __POWERPC__
|
||||
// PPC appears to handle updating of rectangles right
|
||||
{
|
||||
uint num_dirty_rects;
|
||||
uint length_drawn;
|
||||
uint left;
|
||||
uint i;
|
||||
/* Check if we need to do anything */
|
||||
if (num_dirty_rects == 0 ) return;
|
||||
|
||||
num_dirty_rects = _cocoa_video_data.num_dirty_rects;
|
||||
|
||||
/* Check if we need to do anything */
|
||||
if (num_dirty_rects == 0 ) return;
|
||||
|
||||
if (num_dirty_rects >= MAX_DIRTY_RECTS) {
|
||||
num_dirty_rects = 1;
|
||||
_cocoa_video_data.dirty_rects[0].left = 0;
|
||||
_cocoa_video_data.dirty_rects[0].top = 0;
|
||||
_cocoa_video_data.dirty_rects[0].right = _cocoa_video_data.width;
|
||||
_cocoa_video_data.dirty_rects[0].bottom = _cocoa_video_data.height;
|
||||
}
|
||||
|
||||
QZ_WaitForVerticalBlank();
|
||||
/* Build the region of dirty rectangles */
|
||||
for (i = 0; i < num_dirty_rects; i++) {
|
||||
|
||||
y = _cocoa_video_data.dirty_rects[i].top;
|
||||
left = _cocoa_video_data.dirty_rects[i].left;
|
||||
length_drawn = _cocoa_video_data.dirty_rects[i].right - left + 1;
|
||||
height = _cocoa_video_data.dirty_rects[i].bottom;
|
||||
for (; y <= height; y++) memcpy(dst + y * pitch + left, src + y * width +left, length_drawn);
|
||||
}
|
||||
|
||||
_cocoa_video_data.num_dirty_rects = 0;
|
||||
if (num_dirty_rects >= MAX_DIRTY_RECTS) {
|
||||
num_dirty_rects = 1;
|
||||
_cocoa_video_data.dirty_rects[0].left = 0;
|
||||
_cocoa_video_data.dirty_rects[0].top = 0;
|
||||
_cocoa_video_data.dirty_rects[0].right = _cocoa_video_data.width;
|
||||
_cocoa_video_data.dirty_rects[0].bottom = _cocoa_video_data.height;
|
||||
}
|
||||
#else
|
||||
// it appears that Intel based macs didn't like to only update parts of the screen at a time, so they still update everything at each frame
|
||||
// we need to switch to use Quartz exclusively (no QuickDraw commands at all) to fix this
|
||||
// to use Quartz exclusively, we should use 16 or 32 bit graphics since 8 bit coloured graphic support sucks
|
||||
height = _cocoa_video_data.height;
|
||||
|
||||
QZ_WaitForVerticalBlank();
|
||||
for (y = 0; y < height; y++) memcpy(dst + y * pitch, src + y * width, width);
|
||||
#endif
|
||||
/* Build the region of dirty rectangles */
|
||||
for (i = 0; i < num_dirty_rects; i++) {
|
||||
|
||||
y = _cocoa_video_data.dirty_rects[i].top;
|
||||
left = _cocoa_video_data.dirty_rects[i].left;
|
||||
length_drawn = _cocoa_video_data.dirty_rects[i].right - left;
|
||||
height = _cocoa_video_data.dirty_rects[i].bottom;
|
||||
for (; y < height; y++) memcpy(dst + y * pitch + left, src + y * width +left, length_drawn);
|
||||
}
|
||||
|
||||
_cocoa_video_data.num_dirty_rects = 0;
|
||||
|
||||
}
|
||||
|
||||
static int QZ_ListFullscreenModes (OTTDPoint *mode_list, int max_modes) {
|
||||
@@ -1701,9 +1688,11 @@ static void QZ_UpdateVideoModes(void)
|
||||
current_modes = _default_resolutions;
|
||||
}
|
||||
|
||||
for(i = 0, j = 0; j < lengthof(_resolutions) && i < count; i++) {
|
||||
if (_cocoa_video_data.fullscreen || ((uint) current_modes[i].x <= _cocoa_video_data.device_width &&
|
||||
(uint) current_modes[i].y <= _cocoa_video_data.device_height)) {
|
||||
for (i = 0, j = 0; j < lengthof(_resolutions) && i < count; i++) {
|
||||
if (_cocoa_video_data.fullscreen || (
|
||||
(uint)current_modes[i].x < _cocoa_video_data.device_width &&
|
||||
(uint)current_modes[i].y < _cocoa_video_data.device_height)
|
||||
) {
|
||||
_resolutions[j][0] = current_modes[i].x;
|
||||
_resolutions[j][1] = current_modes[i].y;
|
||||
j++;
|
||||
|
Reference in New Issue
Block a user