Compare commits

..

4 Commits

Author SHA1 Message Date
bjarni 32a2a6b523 (svn r4046) missed a file in last commit 2006-03-22 22:43:03 +00:00
bjarni 316e189bd7 (svn r4045) -Fix: [OSX] fixed header issue 2006-03-22 22:42:14 +00:00
Darkvater c88ceb9a3e (svn r4043) - Set release version on the executable for VS2003,VS6 and makefile. 2006-03-22 22:30:38 +00:00
Darkvater d49a748b91 (svn r4042) - Release 0.4.6 2006-03-22 22:26:36 +00:00
23 changed files with 230 additions and 210 deletions
+6 -16
View File
@@ -109,8 +109,7 @@
#
# Special for crosscompiling there are some commands available:
#
# 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)
# FAT_BINARY: builds a universal binary for OSX. Make sure you got both PPC and x86 libs. Only works with GCC 4 or newer
#
# 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
@@ -133,7 +132,7 @@
# Makefile version tag
# it checks if the version tag in Makefile.config is the same and force update outdated config files
MAKEFILE_VERSION:=9
MAKEFILE_VERSION:=8
# CONFIG_WRITER has to be found even for manual configuration
CONFIG_WRITER=makefiledir/Makefile.config_writer
@@ -268,7 +267,7 @@ ENDIAN_CHECK=endian_check$(EXE)
STRGEN=strgen/strgen$(EXE)
OSXAPP="OpenTTD.app"
REV := 0.4.7
REV := 0.4.6
# MorphOS needs builddate
BUILDDATE=`date +%d.%m.%y`
@@ -341,11 +340,6 @@ 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
@@ -1000,21 +994,17 @@ 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) $(TARGET_CPU_FLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $<
$(Q)$(CC) $(CFLAGS) $(CDEFS) -c -o $@ $<
%.o: %.cpp $(MAKE_CONFIG)
@echo '===> Compiling $<'
$(Q)$(CXX) $(TARGET_CPU_FLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $<
$(Q)$(CXX) $(CFLAGS) $(CDEFS) -c -o $@ $<
%.o: %.m $(MAKE_CONFIG)
@echo '===> Compiling $<'
$(Q)$(CC) $(TARGET_CPU_FLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $<
endif
$(Q)$(CC) $(CFLAGS) $(CDEFS) -c -o $@ $<
%.o: %.rc
@echo '===> Compiling resource $<'
+1 -9
View File
@@ -1,12 +1,4 @@
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)
t 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
View File
@@ -1,10 +0,0 @@
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
+36
View File
@@ -0,0 +1,36 @@
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 -1
View File
@@ -1,6 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.\" Please adjust this date whenever revising the manpage.
.Dd March 26, 2006
.Dd March 22, 2006
.Dt OPENTTD 6
.Sh NAME
.Nm openttd
+3 -3
View File
@@ -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.7
Bugs for 0.4.6
------------------------------------------------------------------------
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.7
Minor Bugs for 0.4.5.1
------------------------------------------------------------------------
URL: http://sourceforge.net/tracker/?atid=669662&group_id=103924&func=browse
+18 -6
View File
@@ -87,13 +87,25 @@ $(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,CFLAGS_UNIVERSAL:=$(CFLAGS_UNIVERSAL))
$(call CONFIG_LINE,LDFLAGS_UNIVERSAL:=$(LDFLAGS_UNIVERSAL))
$(call CONFIG_LINE,SDL_PPC_CONFIG:=$(SDL_PPC_CONFIG))
$(call CONFIG_LINE,SDL_x86_CONFIG:=$(SDL_x86_CONFIG))
$(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,\# 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,)
$(call CONFIG_LINE,\# For cross-compiling)
+1 -1
View File
@@ -15,7 +15,7 @@
extern const char _openttd_revision[];
#elif defined(WITH_REV_HACK)
#define WITH_REV
const char _openttd_revision[] = "0.4.7";
const char _openttd_revision[] = "0.4.6";
#else
const char _openttd_revision[] = NOREV_STRING;
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef NETWORK_H
#define NETWORK_H
#define NOREV_STRING "0.4.7-norev000"
#define NOREV_STRING "0.4.6-norev000"
#ifdef ENABLE_NETWORK
+4 -1
View File
@@ -11,10 +11,13 @@
#ifdef ENABLE_NETWORK
#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_2)
#if defined(__APPLE__)
#include <AvailabilityMacros.h>
#if (MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_2)
// OSX 10.2 don't have socklen_t defined, so we will define it here
typedef int socklen_t;
#endif
#endif
// Windows stuff
#if defined(WIN32) || defined(WIN64)
-2
View File
@@ -548,8 +548,6 @@ 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. */
+1 -1
View File
@@ -1,4 +1,4 @@
openttd (0.4.7-1) unstable; urgency=low
openttd (0.4.6-1) unstable; urgency=low
* Remove old terminal messages and make sure that debconf is always called.
+1 -1
View File
@@ -5,7 +5,7 @@
#------------------------------------------------------------------------------
%define name openttd
%define version 0.4.7
%define version 0.4.6
%define release 1mdk
#------------------------------------------------------------------------------
-29
View File
@@ -1,29 +0,0 @@
/* $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");
}
+34 -45
View File
@@ -2,47 +2,36 @@
# This makefile is not a standalone makefile, but is called from the general one
# it contains targets specific to MacOS X
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
ifdef FAT_BINARY
FAT_BINARY:=build_universal_binary
endif
ifdef UNIVERSAL_PPC_PART
ifdef UNIVERSAL_x86_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
ifdef JAGUAR
JAGUAR_POSTFIX := -jaguar
endif
$(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
# 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)
$(BUILD_OSX_BUNDLE): $(TTD) $(FAT_BINARY)
@echo '===> Building application bundle'
$(Q)rm -fr "$(OSXAPP)"
$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS
@@ -59,23 +48,23 @@ $(BUILD_OSX_BUNDLE): $(TTD)
# 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
@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)"
$(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)"
$(OSX): $(TTD) $(BUILD_OSX_BUNDLE)
.PHONY: release $(BUILD_OSX_BUNDLE) $(UNIVERSAL_BINARY)
.PHONY: release $(BUILD_OSX_BUNDLE) $(FAT_BINARY)
+70 -40
View File
@@ -11,29 +11,12 @@ endif
endif
ifdef RELEASE
ifndef UNIVERSAL_BINARY
ifndef FAT_BINARY
$(warning Compiling a release build, that is not a universal binary)
endif
endif
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
ifdef FAT_BINARY
ifndef STATIC
$(warning Compiling a universal binary, that is not static. Adding static flag)
STATIC:=1
@@ -47,36 +30,83 @@ endif
endif
# setup flags if none are defined
ifndef CFLAGS_JAGUAR
CFLAGS_JAGUAR:= -isysroot /Developer/SDKs/MacOSX10.2.8.sdk
ifndef CFLAGS_PPC
CFLAGS_PPC:= -isysroot /Developer/SDKs/MacOSX10.2.8.sdk
endif
ifndef LDFLAGS_JAGUAR
LDFLAGS_JAGUAR:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk
ifndef LDFLAGS_PPC
LDFLAGS_PPC:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk
endif
ifndef CFLAGS_UNIVERSAL
CFLAGS_UNIVERSAL:= -isysroot /Developer/SDKs/MacOSX10.4u.sdk
ifndef PPC_CC
PPC_CC:=powerpc-apple-darwin8-gcc-4.0.0
endif
ifndef LDFLAGS_UNIVERSAL
LDFLAGS_UNIVERSAL:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
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
endif
ifdef JAGUAR
CFLAGS:= $(CFLAGS_JAGUAR) -arch ppc
LDFLAGS:= $(LDFLAGS_JAGUAR)
LIBPNG-CONFIG:=$(LIBPNG_PPC_CONFIG)
SDL-CONFIG:=$(SDL_PPC_CONFIG)
CC_TARGET:=$(PPC_CC)
CFLAGS:= $(CFLAGS_PPC) -arch ppc
LDFLAGS:= $(LDFLAGS_PPC)
endif
ifndef G5_FLAGS
G5_FLAGS := -mtune=970 -mcpu=970 -mpowerpc-gpopt
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
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
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
endif
# setting up flags to make a binary, that fits the system it builds on
+3 -3
View File
@@ -1,8 +1,8 @@
; Define your application name
!define APPNAME "OpenTTD"
!define APPNAMEANDVERSION "OpenTTD 0.4.7.0"
!define APPVERSION "0.4.7.0"
!define INSTALLERVERSION 19 ;NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define APPNAMEANDVERSION "OpenTTD 0.4.6.0"
!define APPVERSION "0.4.6.0"
!define INSTALLERVERSION 18 ;NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define MUI_ICON "..\..\..\openttd.ico"
!define MUI_UNICON "..\..\..\openttd.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
+3 -3
View File
@@ -61,8 +61,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,4,7,0
PRODUCTVERSION 0,4,7,0
FILEVERSION 0,4,6,0
PRODUCTVERSION 0,4,6,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.7.0\0"
VALUE "FileVersion", "0.4.6.0\0"
VALUE "InternalName", "openttd\0"
VALUE "LegalCopyright", "Copyright © OpenTTD Developers 2002-2006. All Rights Reserved.\0"
VALUE "LegalTrademarks", "\0"
+2 -2
View File
@@ -1,6 +1,6 @@
OpenTTD README
Last updated: 2006-03-26
Release version: 0.4.7
Last updated: 2006-03-22
Release version: 0.4.6
------------------------------------------------------------------------
-3
View File
@@ -265,9 +265,6 @@ 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__
+1
View File
@@ -43,6 +43,7 @@ ULONG __stack = (1024*1024)*2; // maybe not that much is needed actually ;)
#endif
#if defined(__APPLE__)
#include <AvailabilityMacros.h>
#if defined(WITH_SDL)
//the mac implementation needs this file included in the same file as main()
#include <SDL.h>
+2 -2
View File
@@ -505,7 +505,7 @@ Vehicle *GetFirstVehicleInChain(const Vehicle *v)
assert(v != NULL);
if (v->first != NULL) {
if (IsFrontEngine(v->first) || IsFreeWagon(v->first)) return v->first;
if (IsFrontEngine(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) || IsFreeWagon(v))
if (IsFrontEngine(v))
for (u = (Vehicle *)v; u != NULL; u = u->next) u->first = (Vehicle *)v;
return (Vehicle*)v;
+42 -31
View File
@@ -1507,41 +1507,54 @@ 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;
/* Check if we need to do anything */
if (num_dirty_rects == 0 ) return;
#ifdef __POWERPC__
// PPC appears to handle updating of rectangles right
{
uint num_dirty_rects;
uint length_drawn;
uint left;
uint i;
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;
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;
}
#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();
/* 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;
for (y = 0; y < height; y++) memcpy(dst + y * pitch, src + y * width, width);
#endif
}
static int QZ_ListFullscreenModes (OTTDPoint *mode_list, int max_modes) {
@@ -1688,11 +1701,9 @@ 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++;