mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-16 07:39:52 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 133be0b744 |
+7
-41
@@ -1,46 +1,12 @@
|
||||
Makefile*
|
||||
bin/*
|
||||
!bin/ai
|
||||
bin/ai/*
|
||||
!bin/ai/compat*.nut
|
||||
!bin/ai/regression
|
||||
!bin/data
|
||||
bin/data/*
|
||||
bundle/*
|
||||
!bin/data/chars.grf
|
||||
!bin/data/openttdd.grf
|
||||
!bin/data/openttdw.grf
|
||||
!bin/data/opntitle.dat
|
||||
!bin/data/orig_*.obg
|
||||
!bin/data/orig_*.obs
|
||||
!bin/data/no_sound.obs
|
||||
!bin/gm
|
||||
bin/gm/*
|
||||
!bin/gm/no_music.obm
|
||||
!bin/gm/orig_*.obm
|
||||
!bin/scripts
|
||||
bin/scripts/*
|
||||
!bin/scripts/*.example
|
||||
!bin/scripts/readme.txt
|
||||
|
||||
bundle/*
|
||||
bundles/*
|
||||
docs/aidocs/*
|
||||
docs/source/*
|
||||
media/openttd.desktop
|
||||
media/openttd.desktop.install
|
||||
!bin/data/opntitle.grf
|
||||
!bin/scenario/README
|
||||
!bin/scripts*
|
||||
config.*
|
||||
objs/*
|
||||
projects/Debug
|
||||
projects/Release
|
||||
projects/*.ncb
|
||||
projects/*.suo
|
||||
projects/*.sdf
|
||||
projects/*.opensdf
|
||||
projects/*.vcproj.*.user
|
||||
projects/*.vcxproj.user
|
||||
src/rev.cpp
|
||||
src/os/windows/ottdres.rc
|
||||
|
||||
/Makefile*
|
||||
!/Makefile.msvc
|
||||
/config.*
|
||||
!/config.lib
|
||||
!*.in
|
||||
*.tmp
|
||||
|
||||
@@ -1,26 +1,11 @@
|
||||
syntax: glob
|
||||
|
||||
bin/lang/*
|
||||
bin/openttd*
|
||||
bin/*.cfg
|
||||
bin/opentd*
|
||||
bundle/*
|
||||
bundles/*
|
||||
config.cache*
|
||||
config.cache.*
|
||||
config.log
|
||||
config.pwd
|
||||
docs/aidocs/*
|
||||
docs/source/*
|
||||
Makefile
|
||||
Makefile.am
|
||||
Makefile.bundle
|
||||
media/openttd.desktop
|
||||
media/openttd.desktop.install
|
||||
media/openttd.desktop*
|
||||
objs/*
|
||||
projects/*.ncb
|
||||
projects/*.suo
|
||||
projects/*.sdf
|
||||
projects/*.opensdf
|
||||
projects/*.vcproj.*.user
|
||||
projects/*.vcxproj.user
|
||||
src/rev.cpp
|
||||
src/os/windows/ottdres.rc
|
||||
|
||||
+1
-2
@@ -88,8 +88,7 @@ endif
|
||||
$(Q)cp "$(BIN_DIR)/scripts/"* "$(BUNDLE_DIR)/scripts/"
|
||||
ifdef MENU_DIR
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/"
|
||||
$(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | $(SORT) >> "$(BUNDLE_DIR)/media/openttd.desktop"
|
||||
$(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install"
|
||||
$(Q)cat "$(ROOT_DIR)/media/openttd.desktop" | sed s/=openttd/=$(BINARY_NAME)/g > "$(ROOT_DIR)/media/openttd.desktop.install"
|
||||
endif
|
||||
ifeq ($(TTD), openttd.exe)
|
||||
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt"
|
||||
|
||||
@@ -43,7 +43,6 @@ OSXAPP = !!OSXAPP!!
|
||||
LIPO = !!LIPO!!
|
||||
REVISION = !!REVISION!!
|
||||
AWK = !!AWK!!
|
||||
SORT = !!SORT!!
|
||||
DISTCC = !!DISTCC!!
|
||||
|
||||
RES := $(shell if [ ! -f $(CONFIG_CACHE_PWD) ] || [ "`pwd`" != "`cat $(CONFIG_CACHE_PWD)`" ]; then echo "`pwd`" > $(CONFIG_CACHE_PWD); fi )
|
||||
|
||||
@@ -192,9 +192,9 @@ function Regression::Base()
|
||||
print(" RandRange(2): " + AIBase.RandRange(2));
|
||||
print(" RandRange(2): " + AIBase.RandRange(2));
|
||||
print(" RandRange(2): " + AIBase.RandRange(2));
|
||||
print(" RandRange(1000000): " + AIBase.RandRange(1000000)); // 32 bit tests
|
||||
print(" RandRange(1000000): " + AIBase.RandRange(1000000));
|
||||
print(" RandRange(1000000): " + AIBase.RandRange(1000000));
|
||||
print(" RandRange(9): " + AIBase.RandRange(9));
|
||||
print(" RandRange(9): " + AIBase.RandRange(9));
|
||||
print(" RandRange(9): " + AIBase.RandRange(9));
|
||||
print(" Chance(1, 2): " + AIBase.Chance(1, 2));
|
||||
print(" Chance(1, 2): " + AIBase.Chance(1, 2));
|
||||
print(" Chance(1, 2): " + AIBase.Chance(1, 2));
|
||||
@@ -1027,7 +1027,6 @@ function Regression::RailTypeList()
|
||||
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
|
||||
print(" RailType: " + i);
|
||||
print(" IsRailTypeAvailable(): " + AIRail.IsRailTypeAvailable(i));
|
||||
print(" GetMaxSpeed(): " + AIRail.GetMaxSpeed(i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1755,48 +1754,6 @@ function Regression::PrintSubsidy(subsidy_id)
|
||||
print(" GetCargoType(): " + AISubsidy.GetCargoType(subsidy_id));
|
||||
}
|
||||
|
||||
function Regression::Math()
|
||||
{
|
||||
print("");
|
||||
print("--Math--");
|
||||
print(" -2147483648 < -2147483647: " + (-2147483648 < -2147483647));
|
||||
print(" -2147483648 < -1 : " + (-2147483648 < -1 ));
|
||||
print(" -2147483648 < 0 : " + (-2147483648 < 0 ));
|
||||
print(" -2147483648 < 1 : " + (-2147483648 < 1 ));
|
||||
print(" -2147483648 < 2147483647: " + (-2147483648 < 2147483647));
|
||||
|
||||
print(" -2147483647 < -2147483648: " + (-2147483647 < -2147483648));
|
||||
print(" -1 < -2147483648: " + (-1 < -2147483648));
|
||||
print(" 0 < -2147483648: " + ( 0 < -2147483648));
|
||||
print(" 1 < -2147483648: " + ( 1 < -2147483648));
|
||||
print(" 2147483647 < -2147483648: " + ( 2147483647 < -2147483648));
|
||||
|
||||
print(" -1 > 2147483647: " + (-1 > 2147483647));
|
||||
print(" -1 > 1 : " + (-1 > 1 ));
|
||||
print(" -1 > 0 : " + (-1 > 0 ));
|
||||
print(" -1 > -1 : " + (-1 > -1 ));
|
||||
print(" -1 > -2147483648: " + (-1 > -2147483648));
|
||||
|
||||
print(" 1 > 2147483647: " + ( 1 > 2147483647));
|
||||
print(" 1 > 1 : " + ( 1 > 1 ));
|
||||
print(" 1 > 0 : " + ( 1 > 0 ));
|
||||
print(" 1 > -1 : " + ( 1 > -1 ));
|
||||
print(" 1 > -2147483648: " + ( 1 > -2147483648));
|
||||
|
||||
print(" 2147483647 > 2147483646: " + ( 2147483647 > 2147483646));
|
||||
print(" 2147483647 > 1 : " + ( 2147483647 > 1 ));
|
||||
print(" 2147483647 > 0 : " + ( 2147483647 > 0 ));
|
||||
print(" 2147483647 > -1 : " + ( 2147483647 > -1 ));
|
||||
print(" 2147483647 > -2147483648: " + ( 2147483647 > -2147483648));
|
||||
|
||||
print(" 2147483646 > 2147483647: " + ( 2147483646 > 2147483647));
|
||||
print(" 1 > 2147483647: " + ( 1 > 2147483647));
|
||||
print(" 0 > 2147483647: " + ( 0 > 2147483647));
|
||||
print(" -1 > 2147483647: " + (-1 > 2147483647));
|
||||
print(" -2147483648 > 2147483647: " + (-2147483648 > 2147483647));
|
||||
|
||||
print(" 13725 > -2147483648: " + ( 13725 > -2147483648));
|
||||
}
|
||||
|
||||
function Regression::Start()
|
||||
{
|
||||
@@ -1862,7 +1819,5 @@ function Regression::Start()
|
||||
}
|
||||
}
|
||||
print(" IsEventWaiting: false");
|
||||
|
||||
this.Math();
|
||||
}
|
||||
|
||||
|
||||
+233
-267
@@ -96,10 +96,10 @@
|
||||
RandRange(1): 0
|
||||
RandRange(2): 0
|
||||
RandRange(2): 0
|
||||
RandRange(2): 0
|
||||
RandRange(1000000): 987346
|
||||
RandRange(1000000): 781750
|
||||
RandRange(1000000): 191841
|
||||
RandRange(2): 1
|
||||
RandRange(9): 6
|
||||
RandRange(9): 7
|
||||
RandRange(9): 4
|
||||
Chance(1, 2): true
|
||||
Chance(1, 2): false
|
||||
Chance(1, 2): false
|
||||
@@ -2148,201 +2148,201 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 57
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Passenger Carriage
|
||||
GetCargoType(): 0
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 45
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1447
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 25
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 58
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Mail Van
|
||||
GetCargoType(): 2
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 35
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1335
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 21
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 59
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
IsValidEngine(): true
|
||||
GetName(): Coal Truck
|
||||
GetCargoType(): 1
|
||||
CanRefitCargo(): true
|
||||
GetCapacity(): 35
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1031
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 18
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 60
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Oil Tanker
|
||||
GetCargoType(): 3
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 35
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1171
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 24
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 61
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Livestock Van
|
||||
GetCargoType(): 4
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 30
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1125
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 20
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 62
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Goods Van
|
||||
GetCargoType(): 5
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 30
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1113
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 21
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 63
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Grain Hopper
|
||||
GetCargoType(): 6
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 35
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1066
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 19
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 64
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Wood Truck
|
||||
GetCargoType(): 7
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 35
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1060
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 16
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 65
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Iron Ore Hopper
|
||||
GetCargoType(): 8
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 35
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1048
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 19
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 66
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Steel Truck
|
||||
GetCargoType(): 9
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 25
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1148
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 18
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 67
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Armoured Van
|
||||
GetCargoType(): 10
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 25
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1494
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 30
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 2
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 68
|
||||
@@ -2724,201 +2724,201 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 89
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Passenger Carriage
|
||||
GetCargoType(): 0
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 47
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1447
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 25
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 90
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Mail Van
|
||||
GetCargoType(): 2
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 37
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1335
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 21
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 91
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
IsValidEngine(): true
|
||||
GetName(): Coal Truck
|
||||
GetCargoType(): 1
|
||||
CanRefitCargo(): true
|
||||
GetCapacity(): 37
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1031
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 18
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 92
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Oil Tanker
|
||||
GetCargoType(): 3
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 37
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1171
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 24
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 93
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Livestock Van
|
||||
GetCargoType(): 4
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 32
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1125
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 20
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 94
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Goods Van
|
||||
GetCargoType(): 5
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 32
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1113
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 21
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 95
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Grain Hopper
|
||||
GetCargoType(): 6
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 37
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1066
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 19
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 96
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Wood Truck
|
||||
GetCargoType(): 7
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 37
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1060
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 16
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 97
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Iron Ore Hopper
|
||||
GetCargoType(): 8
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 37
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1048
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 19
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 98
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Steel Truck
|
||||
GetCargoType(): 9
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 27
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1148
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 18
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 99
|
||||
IsValidEngine(): false
|
||||
GetName(): (null : 0x00000000)
|
||||
GetCargoType(): 255
|
||||
IsValidEngine(): true
|
||||
GetName(): Armoured Van
|
||||
GetCargoType(): 10
|
||||
CanRefitCargo(): false
|
||||
GetCapacity(): -1
|
||||
GetCapacity(): 27
|
||||
GetReliability(): -1
|
||||
GetMaxSpeed(): -1
|
||||
GetPrice(): -1
|
||||
GetMaxSpeed(): 0
|
||||
GetPrice(): 1494
|
||||
GetMaxAge(): -1
|
||||
GetRunningCost(): -1
|
||||
GetRunningCost(): 0
|
||||
GetPower(): -1
|
||||
GetWeight(): -1
|
||||
GetWeight(): 30
|
||||
GetMaxTractiveEffort(): -1
|
||||
GetVehicleType(): 255
|
||||
GetRailType(): 255
|
||||
GetVehicleType(): 0
|
||||
GetRailType(): 3
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Engine 100
|
||||
@@ -5747,7 +5747,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
GetRailType(): 255
|
||||
GetRoadType(): -1
|
||||
GetPlaneType(): -1
|
||||
Valid Engines: 31
|
||||
Valid Engines: 53
|
||||
|
||||
--EngineList--
|
||||
Count(): 11
|
||||
@@ -7093,7 +7093,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
IsBuoyTile(): false
|
||||
IsLockTile(): false
|
||||
IsCanalTile(): false
|
||||
GetBankBalance(): 479851
|
||||
GetBankBalance(): 480703
|
||||
BuildWaterDepot(): true
|
||||
BuildDock(): true
|
||||
BuildBuoy(): true
|
||||
@@ -7106,7 +7106,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
IsBuoyTile(): true
|
||||
IsLockTile(): true
|
||||
IsCanalTile(): true
|
||||
GetBankBalance(): 450302
|
||||
GetBankBalance(): 451154
|
||||
|
||||
--AIWaypointList(BUOY)--
|
||||
Count(): 1
|
||||
@@ -7125,7 +7125,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
IsBuoyTile(): false
|
||||
IsLockTile(): false
|
||||
IsCanalTile(): false
|
||||
GetBankBalance(): 427657
|
||||
GetBankBalance(): 428509
|
||||
BuildWaterDepot(): true
|
||||
BuildDock(): true
|
||||
|
||||
@@ -7208,7 +7208,6 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
ListDump:
|
||||
RailType: 0
|
||||
IsRailTypeAvailable(): true
|
||||
GetMaxSpeed(): 0
|
||||
|
||||
--Road--
|
||||
Road
|
||||
@@ -8047,7 +8046,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
GetPopulation(): 737
|
||||
GetLocation(): 6446
|
||||
GetHouseCount(): 26
|
||||
GetRating(): 6
|
||||
GetRating(): 5
|
||||
Town 11
|
||||
IsValidTown(): true
|
||||
GetName(): Fort Frindston
|
||||
@@ -8082,7 +8081,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
GetPopulation(): 807
|
||||
GetLocation(): 42338
|
||||
GetHouseCount(): 33
|
||||
GetRating(): 6
|
||||
GetRating(): 5
|
||||
Town 16
|
||||
IsValidTown(): true
|
||||
GetName(): Kennville
|
||||
@@ -8117,7 +8116,7 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
GetPopulation(): 437
|
||||
GetLocation(): 22585
|
||||
GetHouseCount(): 15
|
||||
GetRating(): 6
|
||||
GetRating(): 5
|
||||
Town 21
|
||||
IsValidTown(): true
|
||||
GetName(): Franinghead
|
||||
@@ -8630,37 +8629,4 @@ ERROR: HasNext() is invalid as Begin() is never called
|
||||
GetEventType: 6
|
||||
Unknown Event
|
||||
IsEventWaiting: false
|
||||
|
||||
--Math--
|
||||
-2147483648 < -2147483647: true
|
||||
-2147483648 < -1 : true
|
||||
-2147483648 < 0 : true
|
||||
-2147483648 < 1 : true
|
||||
-2147483648 < 2147483647: true
|
||||
-2147483647 < -2147483648: false
|
||||
-1 < -2147483648: false
|
||||
0 < -2147483648: false
|
||||
1 < -2147483648: false
|
||||
2147483647 < -2147483648: false
|
||||
-1 > 2147483647: false
|
||||
-1 > 1 : false
|
||||
-1 > 0 : false
|
||||
-1 > -1 : false
|
||||
-1 > -2147483648: true
|
||||
1 > 2147483647: false
|
||||
1 > 1 : false
|
||||
1 > 0 : true
|
||||
1 > -1 : true
|
||||
1 > -2147483648: true
|
||||
2147483647 > 2147483646: true
|
||||
2147483647 > 1 : true
|
||||
2147483647 > 0 : true
|
||||
2147483647 > -1 : true
|
||||
2147483647 > -2147483648: true
|
||||
2147483646 > 2147483647: false
|
||||
1 > 2147483647: false
|
||||
0 > 2147483647: false
|
||||
-1 > 2147483647: false
|
||||
-2147483648 > 2147483647: false
|
||||
13725 > -2147483648: true
|
||||
ERROR: The AI died unexpectedly.
|
||||
|
||||
@@ -8,18 +8,14 @@ shortname = NULL
|
||||
version = 2
|
||||
fallback = true
|
||||
description = A sound pack without any sounds.
|
||||
description.af_ZA = 'n Klank stel sonder enige klanke.
|
||||
description.ar_EG = مجموعة صوت بدوت اصوات مضافة
|
||||
description.bg_BG = Празен звуков пакет.
|
||||
description.ca_ES = Un joc de sons sense cap so.
|
||||
description.cs_CZ = Prázdná sada zvuků.
|
||||
description.da_DA = En lydpakke uden lyde.
|
||||
description.de_DE = Basissounds ohne Sound.
|
||||
description.el_GR = Ένα πάκετο ήχων χώρις ήχους.
|
||||
description.en_GB = A sound pack without any sounds.
|
||||
description.en_US = A sound pack without any sounds.
|
||||
description.es_ES = Un conjunto de sonidos vacío.
|
||||
description.et_ET = Ilma häälteta helipakk.
|
||||
description.fi_FI = Äänipaketti ilman ääniä.
|
||||
description.fr_FR = Un pack de sons sans sons.
|
||||
description.hr_HR = Zvučni paket bez ikakvih zvukova.
|
||||
@@ -29,15 +25,10 @@ description.it_IT = Un pacchetto sonoro non contenente alcun suono.
|
||||
description.nb_NO = En lydpakke uten noen lyder.
|
||||
description.nl_NL = Een geluidset zonder geluid.
|
||||
description.nn_NO = Ei lydpakke utan nokon lydar.
|
||||
description.pl_PL = Zestaw dźwięków nie zawierający żadnych dźwięków.
|
||||
description.pt_PT = Um conjunto de sons vazio.
|
||||
description.ro_RO = Un set de sunete fără nici un sunet inclus.
|
||||
description.ru_RU = "Пустой" набор звукового оформления, не содержащий никаких звуков.
|
||||
description.sk_SK = Zvuková sada neobsahujúca zvuky.
|
||||
description.sl_SL = Zvočni paket brez zvoka.
|
||||
description.sr_RS = Prazan skup zvukova.
|
||||
description.sv_SE = Ett ljudpaket utan några ljud.
|
||||
description.tr_TR = Ses içermeyen boş bir ses kümesi.
|
||||
description.zh_TW = 不含任何音效的音效集。
|
||||
|
||||
[files]
|
||||
|
||||
@@ -9,18 +9,14 @@ shortname = TTDD
|
||||
version = 1
|
||||
palette = DOS
|
||||
description = Original Transport Tycoon Deluxe DOS edition graphics.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe grafieke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة الدوس
|
||||
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS.
|
||||
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS.
|
||||
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro DOS).
|
||||
description.da_DA = Originalgrafik fra Transport Tycoon Deluxe DOS-version.
|
||||
description.de_DE = Original Transport Tycoon Deluxe DOS Basisgrafiken.
|
||||
description.el_GR = Αρχικά γραφικά από το Transport Tycoon Deluxe έκδοση DOS.
|
||||
description.en_GB = Original Transport Tycoon Deluxe DOS edition graphics.
|
||||
description.en_US = Original Transport Tycoon Deluxe DOS edition graphics.
|
||||
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión DOS.
|
||||
description.et_ET = Algse Transport Tycoon Deluxe DOSi versiooni graafika.
|
||||
description.fi_FI = Alkuperäiset Transport Tycoon Deluxe DOS grafiikat.
|
||||
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version DOS).
|
||||
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe DOS izdanje.
|
||||
@@ -30,15 +26,10 @@ description.it_IT = Grafica originale di Transport Tycoon Deluxe, edizione DOS.
|
||||
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for DOS.
|
||||
description.nl_NL = Originele graphics van de Transport Tycoon Deluxe DOS-versie.
|
||||
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for DOS.
|
||||
description.pl_PL = Oryginalna edycja grafik dla Transport Tycoon Deluxe DOS.
|
||||
description.pt_PT = Gráficos originais da edição DOS de Transport Tycoon Deluxe.
|
||||
description.ro_RO = Setul grafic original al Transport Tycoon Deluxe pentru DOS.
|
||||
description.ru_RU = Оригинальная графика из Transport Tycoon Deluxe для DOS.
|
||||
description.sk_SK = Pôvodná grafika Transport Tycoon Deluxe (DOS).
|
||||
description.sl_SL = Originalna grafika Transport Tycoon Deluxe za različico DOS.
|
||||
description.sr_RS = Originalni skup grafika Transport Tycoon Deluxe DOS izdanja.
|
||||
description.sv_SE = Originalgrafiken från Transport Tycoon Deluxe, DOS-utgåvan.
|
||||
description.tr_TR = Orijinal Transport Tycoon Deluxe DOS sürümü grafikleri.
|
||||
description.zh_TW = 原版 Transport Tycoon Deluxe DOS 版的圖形。
|
||||
|
||||
[files]
|
||||
|
||||
@@ -8,18 +8,14 @@ name = original_dos
|
||||
shortname = TTDO
|
||||
version = 0
|
||||
description = Original Transport Tycoon Deluxe DOS edition sounds.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe klanke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة الدوس
|
||||
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за DOS.
|
||||
description.ca_ES = Sons originals de Transport Tycoon Deluxe per a DOS.
|
||||
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro DOS).
|
||||
description.da_DA = Originallyd fra Transport Tycoon Deluxe DOS-version.
|
||||
description.de_DE = Original Transport Tycoon Deluxe DOS Basissounds.
|
||||
description.el_GR = Αρχικοί ήχοι από το Transport Tycoon Deluxe έκδοση DOS.
|
||||
description.en_GB = Original Transport Tycoon Deluxe DOS edition sounds.
|
||||
description.en_US = Original Transport Tycoon Deluxe DOS edition sounds.
|
||||
description.es_ES = Sonidos originales de Transport Tycoon Deluxe versión DOS.
|
||||
description.et_ET = Algse Transport Tycoon Deluxe DOSi versiooni helid.
|
||||
description.fi_FI = Alkuperäiset Transport Tycoon Deluxe DOS äänet.
|
||||
description.hr_HR = Originalni zvukovi za Transport Tycoon Deluxe DOS izdanje.
|
||||
description.hu_HU = Az eredeti Transport Tycoon Deluxe DOS verziójának hangjai.
|
||||
@@ -29,15 +25,10 @@ description.it_IT = Suoni originali di Transport Tycoon Deluxe, edizione DOS.
|
||||
description.nb_NO = Originale lyder fra Transport Tycoon Deluxe for DOS.
|
||||
description.nl_NL = Originele geluiden van de Transport Tycoon Deluxe DOS-versie.
|
||||
description.nn_NO = Originale lydar frå Transport Tycoon Deluxe for DOS.
|
||||
description.pl_PL = Oryginalna edycja dźwięków dla Transport Tycoon Deluxe DOS.
|
||||
description.pt_PT = Sons originais da edição DOS de Transport Tycoon Deluxe.
|
||||
description.ro_RO = Setul de sunete original al Transport Tycoon Deluxe pentru DOS.
|
||||
description.ru_RU = Оригинальный набор звукового оформления из игры Transport Tycoon Deluxe для DOS.
|
||||
description.sk_SK = Pôvodné zvuky Transport Tycoon Deluxe (DOS).
|
||||
description.sl_SL = Originalni zvoki Transport Tycoon Deluxe različice DOS.
|
||||
description.sr_RS = Originalni skup zvukova Transport Tycoon Deluxe DOS izdanja.
|
||||
description.sv_SE = Originalljuden från Transport Tycoon Deluxe, DOS-utgåvan.
|
||||
description.tr_TR = Orijinal Transport Tycoon Deluxe DOS sürümü sesleri.
|
||||
description.zh_TW = 原版 Transport Tycoon Deluxe DOS 版的音效。
|
||||
|
||||
[files]
|
||||
|
||||
@@ -9,18 +9,14 @@ shortname = TTDD
|
||||
version = 0
|
||||
palette = DOS
|
||||
description = Original Transport Tycoon Deluxe DOS (German) edition graphics.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS (German) uitgawe grafieke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الالمانية نسخة الدوس
|
||||
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS (немски) .
|
||||
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS (Alemany).
|
||||
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (německá verze pro DOS).
|
||||
description.da_DA = Originalgrafik fra Transport Tycoon Deluxe DOS (Tysk) version.
|
||||
description.de_DE = Original Transport Tycoon Deluxe DOS (Deutsch) Basisgrafiken.
|
||||
description.el_GR = Αρχικά γραφικά από το Transport Tycoon Deluxe έκδοση DOS (Γερμανικό).
|
||||
description.en_GB = Original Transport Tycoon Deluxe DOS (German) edition graphics.
|
||||
description.en_US = Original Transport Tycoon Deluxe DOS (German) edition graphics.
|
||||
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión DOS (Alemán).
|
||||
description.et_ET = Algse Transport Tycoon Deluxe DOSi (Saksa) versiooni graafika.
|
||||
description.fi_FI = Alkuperäiset Transport Tycoon Deluxe DOS (Saksalainen) grafiikat.
|
||||
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version DOS allemande).
|
||||
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe DOS (Njemački) izdanje.
|
||||
@@ -30,15 +26,10 @@ description.it_IT = Grafica originale di Transport Tycoon Deluxe (tedesco), ediz
|
||||
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for DOS (tysk).
|
||||
description.nl_NL = Originele graphics van de Duitse Transport Tycoon Deluxe DOS-versie.
|
||||
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for DOS (tysk).
|
||||
description.pl_PL = Oryginalna edycja grafik dla Transport Tycoon Deluxe DOS (German).
|
||||
description.pt_PT = Gráficos originais da edição DOS (Alemã) de Transport Tycoon Deluxe.
|
||||
description.ro_RO = Setul grafic original al Transport Tycoon Deluxe pentru DOS (ediţia germană).
|
||||
description.ru_RU = Оригинальная графика из немецкой версии Transport Tycoon Deluxe для DOS.
|
||||
description.sk_SK = Pôvodná grafika Transport Tycoon Deluxe (DOS) (v jazyku nemčina).
|
||||
description.sl_SL = Originalna grafika Transport Tycoon Deluxe za nemško različico DOS.
|
||||
description.sr_RS = Originalni skup grafika nemačkog Transport Tycoon Deluxe DOS izdanja.
|
||||
description.sv_SE = Originalgrafiken från Transport Tycoon Deluxe, DOS-utgåvan (tyska).
|
||||
description.tr_TR = Orijinal Transport Tycoon Deluxe DOS (Almanca) sürümü grafikleri.
|
||||
description.zh_TW = 原版 Transport Tycoon Deluxe DOS 版 (德國版) 的圖形。
|
||||
|
||||
[files]
|
||||
|
||||
@@ -9,18 +9,14 @@ shortname = TTDW
|
||||
version = 0
|
||||
palette = Windows
|
||||
description = Original Transport Tycoon Deluxe Windows edition graphics.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe grafieke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة وندوز
|
||||
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за Windows.
|
||||
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a Windows.
|
||||
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro Windows).
|
||||
description.da_DA = Originalgrafik fra Transport Tycoon Deluxe Windows-version.
|
||||
description.de_DE = Original Transport Tycoon Deluxe Windows Basisgrafiken.
|
||||
description.el_GR = Αρχικά γραφικά από το Transport Tycoon Deluxe έκδοση Windows.
|
||||
description.en_GB = Original Transport Tycoon Deluxe Windows edition graphics.
|
||||
description.en_US = Original Transport Tycoon Deluxe Windows edition graphics.
|
||||
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión Windows.
|
||||
description.et_ET = Algse Transport Tycoon Deluxe Windowsi versiooni graafika.
|
||||
description.fi_FI = Alkuperäiset Transport Tycoon Deluxe Windows grafiikat.
|
||||
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version Windows).
|
||||
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe Windows izdanje.
|
||||
@@ -30,15 +26,10 @@ description.it_IT = Grafica originale di Transport Tycoon Deluxe, edizione Windo
|
||||
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for Windows.
|
||||
description.nl_NL = Originele graphics van de Transport Tycoon Deluxe Windows-versie.
|
||||
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for Windows.
|
||||
description.pl_PL = Oryginalna edycja grafik dla Transport Tycoon Deluxe Windows.
|
||||
description.pt_PT = Gráficos originais da edição Windows de Transport Tycoon Deluxe.
|
||||
description.ro_RO = Setul grafic original al Transport Tycoon Deluxe pentru Windows.
|
||||
description.ru_RU = Оригинальная графика из Transport Tycoon Deluxe для Windows.
|
||||
description.sk_SK = Pôvodná grafika Transport Tycoon Deluxe (Windows).
|
||||
description.sl_SL = Originalna grafika Transport Tycoon Deluxe za različico oken(windows).
|
||||
description.sr_RS = Originalni skup grafika Transport Tycoon Deluxe Windows izdanja.
|
||||
description.sv_SE = Originalgrafiken från Transport Tycoon Deluxe, Windows-utgåvan.
|
||||
description.tr_TR = Orijinal Transport Tycoon Deluxe Windows sürümü grafikleri.
|
||||
description.zh_TW = 原版 Transport Tycoon Deluxe Windows 版的圖形。
|
||||
|
||||
[files]
|
||||
|
||||
@@ -8,18 +8,14 @@ name = original_windows
|
||||
shortname = TTDO
|
||||
version = 0
|
||||
description = Original Transport Tycoon Deluxe Windows edition sounds.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe klanke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة وندوز
|
||||
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за Windows.
|
||||
description.ca_ES = Sons originals de Transport Tycoon Deluxe per a Windows.
|
||||
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro Windows).
|
||||
description.da_DA = Originallyd fra Transport Tycoon Deluxe Windows-version.
|
||||
description.de_DE = Original Transport Tycoon Deluxe Windows Basissounds.
|
||||
description.el_GR = Αρχικοί ήχοι από το Transport Tycoon Deluxe έκδοση Windows.
|
||||
description.en_GB = Original Transport Tycoon Deluxe Windows edition sounds.
|
||||
description.en_US = Original Transport Tycoon Deluxe Windows edition sounds.
|
||||
description.es_ES = Sonidos originales de Transport Tycoon Deluxe versión Windows.
|
||||
description.et_ET = Algse Transport Tycoon Deluxe Windowsi versiooni helid.
|
||||
description.fi_FI = Alkuperäiset Transport Tycoon Deluxe Windows äänet.
|
||||
description.hr_HR = Originalni zvukovi za Transport Tycoon Deluxe Windows izdanje.
|
||||
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának hangjai.
|
||||
@@ -29,15 +25,10 @@ description.it_IT = Suoni originali di Transport Tycoon Deluxe, edizione Windows
|
||||
description.nb_NO = Originale lyder fra Transport Tycoon Deluxe for Windows.
|
||||
description.nl_NL = Originele geluiden van de Transport Tycoon Deluxe Windows-versie.
|
||||
description.nn_NO = Originale lydar frå Transport Tycoon Deluxe for Windows.
|
||||
description.pl_PL = Oryginalna edycja dźwięków dla Transport Tycoon Deluxe Windows.
|
||||
description.pt_PT = Sons originais da edição Windows de Transport Tycoon Deluxe.
|
||||
description.ro_RO = Setul de sunete original al Transport Tycoon Deluxe pentru Windows.
|
||||
description.ru_RU = Оригинальный набор звукового оформления из игры Transport Tycoon Deluxe для Windows.
|
||||
description.sk_SK = Pôvodné zvuky Transport Tycoon Deluxe (Windows).
|
||||
description.sl_SL = Originalni zvoki Transport Tycoon Deluxe različice oken(windows).
|
||||
description.sr_RS = Originalni skup zvukova Transport Tycoon Deluxe Windows izdanja.
|
||||
description.sv_SE = Originalljuden från Transport Tycoon Deluxe, Windows-utgåvan.
|
||||
description.tr_TR = Orijinal Transport Tycoon Deluxe Windows sürümü sesleri.
|
||||
description.zh_TW = 原版 Transport Tycoon Deluxe Windows 版的音效。
|
||||
|
||||
[files]
|
||||
|
||||
@@ -8,18 +8,14 @@ shortname = NULL
|
||||
version = 0
|
||||
fallback = true
|
||||
description = A music pack without actual music.
|
||||
description.af_ZA = 'n Musiek stel sonder enige musiek.
|
||||
description.ar_EG = مجموعة موسيقى بدون موسيقى
|
||||
description.bg_BG = Празен музикален пакет.
|
||||
description.ca_ES = Un joc de música sense cap música.
|
||||
description.cs_CZ = Prázná hudební sada.
|
||||
description.da_DA = En musikpakke uden musik.
|
||||
description.de_DE = Ein Musikset ohne Musik.
|
||||
description.el_GR = Ένα πάκετο μουσικής χωρίς πραγματική μουσική.
|
||||
description.en_GB = A music pack without actual music.
|
||||
description.en_US = A music pack without actual music.
|
||||
description.es_ES = Un conjunto de música vacío.
|
||||
description.et_ET = Muusikakomplekt ilma igasuguse muusikata.
|
||||
description.fi_FI = Musiikkipaketti, jossa ei ole musiikkia.
|
||||
description.fr_FR = Un pack de musiques sans musiques.
|
||||
description.hr_HR = Muzički paket bez ikakve muzike.
|
||||
@@ -29,15 +25,10 @@ description.it_IT = Un pacchetto musicale non contenente alcuna musica.
|
||||
description.nb_NO = En musikkpakke uten noe musikk.
|
||||
description.nl_NL = Een muziekset zonder muziek.
|
||||
description.nn_NO = Ei musikkpakke utan noko musikk.
|
||||
description.pl_PL = Zestaw utworów muzycznych nie zawierający żadnej muzyki.
|
||||
description.pt_PT = Um conjunto de música vazio.
|
||||
description.ro_RO = Un set de muzică fără muzică inclusă.
|
||||
description.ru_RU = "Пустой" набор музыкального оформления, не содержащий никакой музыки.
|
||||
description.sk_SK = Sada hudby neobsahujúca hudbu.
|
||||
description.sl_SL = Glasbeni paket z vključeno glasbo.
|
||||
description.sr_RS = Prazan skup muzičkih numera.
|
||||
description.sv_SE = Ett musikpaket utan någon musik.
|
||||
description.tr_TR = Müzik içermeyen boş bir müzik paketi.
|
||||
description.zh_TW = 不含任何音樂的音樂集。
|
||||
|
||||
[files]
|
||||
|
||||
@@ -8,18 +8,14 @@ name = original_windows
|
||||
shortname = TTDW
|
||||
version = 1
|
||||
description = Original Transport Tycoon Deluxe Windows edition music.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe musiek.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الموسيقية نسخة وندوز
|
||||
description.bg_BG = Оригинална музика на Transport Tycoon Deluxe за Windows.
|
||||
description.ca_ES = Música Original de Transport Tycoon Deluxe per a Windows.
|
||||
description.cs_CZ = Původní hudba Transport Tycoon Deluxe (verze pro Windows).
|
||||
description.da_DA = Originalmusik fra Transport Tycoon Deluxe Windows-version.
|
||||
description.de_DE = Original Transport Tycoon Deluxe Windows Musikset.
|
||||
description.el_GR = Αρχική μουσική από το Transport Tycoon Deluxe έκδοση Windows.
|
||||
description.en_GB = Original Transport Tycoon Deluxe Windows edition music.
|
||||
description.en_US = Original Transport Tycoon Deluxe Windows edition music.
|
||||
description.es_ES = Música original de Transport Tycoon Deluxe versión Windows.
|
||||
description.et_ET = Algse Transport Tycoon Deluxe Windowsi versiooni muusika.
|
||||
description.fi_FI = Alkuperäinen Transport Tycoon Deluxe Windows musiikki.
|
||||
description.fr_FR = Musiques originales de Transport Tycoon Deluxe (version Windows).
|
||||
description.hr_HR = Originalna muzika za Transport Tycoon Deluxe Windows izdanje.
|
||||
@@ -29,15 +25,10 @@ description.it_IT = Musica originale di Transport Tycoon Deluxe, edizione Window
|
||||
description.nb_NO = Original musikk fra Transport Tycoon Deluxe for Windows.
|
||||
description.nl_NL = Originele muziek van de Transport Tycoon Deluxe Windows-versie.
|
||||
description.nn_NO = Original musikk frå Transport Tycoon Deluxe for Windows.
|
||||
description.pl_PL = Oryginalna edycja utworów muzycznych w Transport Tycoon Deluxe Windows.
|
||||
description.pt_PT = Música original da edição Windows de Transport Tycoon Deluxe.
|
||||
description.ro_RO = Setul de muzică original al Transport Tycoon Deluxe pentru Windows.
|
||||
description.ru_RU = Оригинальный набор музыкального оформления из игры Transport Tycoon Deluxe.
|
||||
description.sk_SK = Pôvodná hudba z Transport Tycoon Deluxe (Windows).
|
||||
description.sl_SL = Originalna glasba Transport Tycoon Deluxe različice oken(windows).
|
||||
description.sr_RS = Originalni skup muzičkih numera Transport Tycoon Deluxe Windows izdanja.
|
||||
description.sv_SE = Originalmusiken från Transport Tycoon Deluxe, Windows-utgåvan.
|
||||
description.tr_TR = Orijinal Transport Tycoon Deluxe Windows sürümü müzikleri.
|
||||
description.zh_TW = 原版 Transport Tycoon Deluxe Windows 版的音樂。
|
||||
|
||||
[files]
|
||||
|
||||
+5
-199
@@ -1,197 +1,3 @@
|
||||
1.0.3 (2010-08-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Make it possible to properly assess the length of the rail toolbar caption, don't require '{WHITE}' control codes (r20242)
|
||||
- Fix: Check for disallowed level crossings also when converting rail (r20237)
|
||||
- Fix: Haiku uses a 'special' location for headers (r20219)
|
||||
- Fix: Desync due to (temporary) wrong railtype; when loading a savegame the railtype of some (high ID) trains could be wrong [FS#3945] (r20137)
|
||||
|
||||
|
||||
1.0.3-RC1 (2010-07-17)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [NewGRF] Textstack support for CB 38 (r20086)
|
||||
- Feature: [NewGRF] Add a railtype flag to disallow level crossings per railtype (r20049)
|
||||
- Change: Improve desync debugging, crash log data and the Debian packaging (by making a debug symbols package) (r20138, r20136, r20129)
|
||||
- Fix: Do not scan /data and ~/data (if they happen to be your working directory). If it is the directory where your binary is located it will still scan them [FS#3949] (r20166)
|
||||
- Fix: Integer comparison failed in case the difference was more than 'MAX_UINT'/2 [FS#3954] (r20162)
|
||||
- Fix: [YAPP] Converting a one-way block to a path signal with trains on both sides could lead to a train crash [FS#3937] (r20156)
|
||||
- Fix: [NewGRF] Improve handling of snowing of railtypes and (infra)structures on foundations [FS#3883] (r20153, r20132, r20126, r20125)
|
||||
- Fix: Ships were not marked as dirty when stopping inside a depot [FS#3880] (r20142)
|
||||
- Fix: Some windows ignored all hotkeys [FS#3902] (r20141, r20140, r20139)
|
||||
- Fix: Do not allow building a rail track to the water using a tree-tile [FS#3695] (r20110)
|
||||
- Fix: [NoAI] AITown::GetRating() returned wrong values [FS#3934] (r20103)
|
||||
- Fix: Reading deleted memory when selecting a NewGRF in the content download window of which the data has not been acquired from the content server. The crash would occur after the content server's reply was processed and the ContentInfo object was replaced with another [FS#3899] (r20089, r20082)
|
||||
- Fix: If after loading a savegame (including intro game) one tried to save a game (including autosave) and that failed (very) early on because it could not open the file for writing all pointers would be converted to NULLs which then causes corrupted game states [FS#3876, FS#3887, FS#3920, FS#3923] (r20087)
|
||||
- Fix: gitignore and hgignore had more missing/wrong entries (r20078, r20033, r20031)
|
||||
- Fix: Remove the space between 'open' and 'ttd' in the title screen (r20077)
|
||||
- Fix: Road vehicles could get crashed twice in a tick [FS#3896] (r20053, r20034)
|
||||
- Fix: Coloured_news_year was stored in savegames while it should be a client setting [FS#3916] (r20051)
|
||||
- Fix: Crash when spectator tried to open a vehicle list without selecting any company [FS#3892] (r20041)
|
||||
- Fix: Instead of loading the intro game when loading a savegame fails on the dedicated server, generate a new game [FS#3907] (r20039)
|
||||
- Fix: Tram tracks did not show at level crossing with the new railtypes [FS#3911] (r20036)
|
||||
- Fix: Under some circumstances you could get into an infinite loop [CVE-2010-2534] [FS#3909] (r20035)
|
||||
- Fix: The 64 bits TortoiseSVN was not always properly detected (r20029)
|
||||
- Fix: Do not close the sort dropdown in the (original) vehicle list when there are no vehicles. That code is meant for the 'actions' dropdown [FS#3881] (r20014)
|
||||
- Fix: When joining a company with a password you could only enter 20 characters of the password (r20012)
|
||||
- Fix: Sign sorting was unstable [FS#3893] (r20009)
|
||||
- Fix: Trains should also have running cost while slowing down for stop (r20006)
|
||||
- Fix: [NewGRF] Stringcodes 82, 83 and 84 were not properly converted to openttd codes so they did not work (r20004)
|
||||
- Fix: Clear force_proceed when entering depots and when loading, resetting of force_proceed on manual stopping did not work [FS#3878] (r19992)
|
||||
- Fix: Do not show an error message when trying to start/stop a crashed plane [FS#3874] (r19953)
|
||||
- Fix: Allow turning of roadvehicles while waiting in a queue (r19945)
|
||||
- Fix: Disallow moving of vehicle news window [FS#3865] (r19943)
|
||||
- Fix: Under some (unlucky) circumstances the wrong company would be 'current company' when changing company colour or orders [FS#3903]
|
||||
|
||||
|
||||
1.0.2 (2010-06-19)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Owner of the Waypoint View window was not properly set (r19990)
|
||||
- Fix: Close list of vehicles with given oil rig in orders when the oil rig is deleted (r19956)
|
||||
- Fix: Close list of vehicles with given buoy/oil rig in orders when switching company (r19955)
|
||||
- Fix: Do not close list of waypoint's trains when the waypoint view is closed when it is sticky (r19952)
|
||||
- Fix: Close buoy's vehicle list when the buoy is deleted [FS#3869] (r19951)
|
||||
|
||||
|
||||
1.0.2-RC1 (2010-06-05)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Translated desktop shortcut comments (r19884)
|
||||
- Fix: When 'pause on new game' is set, pause the game before CleanupGeneration() to avoid conflicts with concurrent GUI code [FS#3857] (r19934)
|
||||
- Fix: Pay for the rail/road when constructing tunnels, bridges, depots and stations [FS#3859, FS#3827] (r19925, r19887, r19881)
|
||||
- Fix: Closing chatbox could cause glitches when news message was shown [FS#3865] (r19921)
|
||||
- Fix: [YAPP] Inform the pathfinder as well about the fact that the backside of an one-way path signal can be a safe waiting point [FS#3803] (r19896)
|
||||
- Fix: Allow loading savegames from the console without specifying the '.sav' extension, i.e. make it consistent with saving savegames from the console [FS#3761] (r19885)
|
||||
- Fix: Dropdowns did affect positioning of new windows because they were not yet removed when the new windows were positioned [FS#3812] (r19883)
|
||||
- Fix: [NoAI] AIEngine::IsValidEngine() and AIEngine::IsBuildable() returned false positives. Especially wagons of unavailable railtypes were reported available (r19880)
|
||||
- Fix: Default vehicle group texts were drawn one pixel too low [FS#3851] (r19878)
|
||||
- Fix: It was not possible to send all trains with common waypoint order to depot (r19876)
|
||||
- Fix: Compilation for NetBSD [FS#3809, FS#3840, FS#3845] (r19874, r19859, r19853, r19781)
|
||||
- Fix: If the (guessed initial) destination tile of a road vehicle was not a road stop but was a T-junction or turn, the road vehicles would jump around in circles [FS#3817] (r19873)
|
||||
- Fix: When a network connection gets lost and a game with AIs was loaded the client might crash due to the AIs not being loaded while the game loop is executed [FS#3819] (r19869)
|
||||
- Fix: Use non-breaking spaces for currency pre-/postfixes (r19867)
|
||||
- Fix: Crash when changing/viewing locale settings in the console [FS#3830] (r19865, r19864, r19863, r19862)
|
||||
- Fix: Drawing fallback sprites for unavailable NewGRF waypoints failed (r19852)
|
||||
- Fix: Ensure that both texts of the NewGRF gui download button fit (r19823)
|
||||
- Fix: Kicking clients by IP did not work [FS#3784] (r19818)
|
||||
- Fix: Compilation with MinGW GCC 4.5.0 and UNICODE (r19787)
|
||||
- Fix: If a waypoint is immediately followed by a path signal a reservation would be made from that path signal before the waypoint is marked passed. As a result the order to go to the waypoint is used to reserve the path after the waypoint and as such trains get lost [FS#3770] (r19784)
|
||||
- Fix: NULL pointer deference when testing relative scope *action2 on an unbuilt engine [FS#3828] (r19782)
|
||||
- Fix: Crash on too long paths [FS#3807] (r19780, r19779, r19778, r19777, r19776)
|
||||
- Fix: MP_VOID tiles shall have no tropic zone [FS#3820] (r19769)
|
||||
- Fix: Half-desert tiles would never revert back to clear tiles (r19768)
|
||||
- Fix: Height in smallmap was different from measured heights [FS#3808] (r19767)
|
||||
- Fix: [NewGRF] Vehicle var 43 missed AI information in purchase list (r19761)
|
||||
- Fix: Blocked roadvehicles should first check whether they are still blocked before accelerating again, instead of continuous starting/stopping (r19755)
|
||||
- Fix: Try harder to find a suitable font that can be loaded, i.e. while searching for a suitable font test whether you can open it [FS#3740] (r19753)
|
||||
- Fix: Make sure the chat area fits in the default window size; if you want it larger, you can always change/override it in the config file [FS#3798] (r19751)
|
||||
- Fix: [NewGRF] Industry var 0x43 is not 'safe' during callbacks 22 and 38 either (r19750)
|
||||
- Fix: [NewGRF] Possible divide-by-zero if a NewGRF checked industry var 42 while the production level was 0 (r19749)
|
||||
- Fix: Do not recenter usually centered windows when resizing main window or changing language, if they have been moved/resized before [FS#3675] (r19746)
|
||||
- Fix: The GUI is controlled by _local_company, not _current_company (r19745)
|
||||
- Fix: NewGRFs could access map bits of not yet constructed industries and houses during construction callbacks (r19748, r19743)
|
||||
- Fix: [NewGRF] Passing some invalid data to industry variable 67/68 could cause a crash (r19713)
|
||||
- Fix: Check for industry availability more thoroughly and cancel object placement when selecting not available industries [FS#3787] (r19701)
|
||||
- Fix: Avoid showing building toolbars behind the main toolbar when the 'Link landscape toolbar' setting is active [FS#3781] (r19696)
|
||||
- Fix: Under some circumstances the player's name could be empty (r19693)
|
||||
- Fix: Do not show an error message when trying to give another client an amount of 0 money [FS#3779] (r19684)
|
||||
- Fix: Do not display an error message when double clicking on a vehicle in the 'available vehicles'-window (r19669)
|
||||
- Change: Name invalid engines, cargos and industries 'invalid', if the player removed the supplying NewGRFs, hide invalid engines from the purchase list (r19879, r19877)
|
||||
|
||||
|
||||
1.0.1 (2010-05-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Crash when using restart via rcon (r19722)
|
||||
- Fix: Leaking a file descriptor [CVE-2010-0406] [FS#3785] (r19695)
|
||||
- Fix: Crash when the music/graphics metadata files were unreadable [FS#3774] (r19674)
|
||||
|
||||
|
||||
1.0.1-RC2 (2010-04-22)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Desync when joining the game because of using the wrong variable (r19687)
|
||||
- Fix: Truncated archives were not detected when using zlib 1.2.3. This also fixes zlib 1.2.4 compatibility, zlib 1.2.5 is bugfree (r19686)
|
||||
- Fix: Towns with 3x3 and 2x2 road layouts could not expand (r19683)
|
||||
- Fix: When joining a MP game all clients with company ID > 0 would be shown as if they were a spectator [FS#3775] (r19680)
|
||||
- Fix: Client status was shown incorrect in the console (r19678)
|
||||
|
||||
|
||||
1.0.1-RC1 (2010-04-17)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [NewGRF] Support for extended text code 0x9A 11, print qword (r19570)
|
||||
- Feature: Give more detailed error message when trying to build a too long bridge (r19561)
|
||||
- Feature: Add rail speed limit to land area information window (r19556, r19434)
|
||||
- Add: [NoAI] AIRail::GetMaxSpeed(RailType) to get the speed limit of railtypes (r19591)
|
||||
- Change: Sync Debian packaging updates from Debian, but keep building a single package (r19572)
|
||||
- Fix: Crash of a dedicated server if the null blitter is overridden and (after a while) there is no company 0 on new year anymore [FS#3749] (r19664)
|
||||
- Fix: In rare cases, update of signals could be missed (r19663)
|
||||
- Fix: Various improvements of command handling, missing error messages, improper validation causing crashes [CVE-2010-0402] [FS#3748] (r19658, r19657, r19656, r19655, r19654, r19637, r19633, r19621, r19616, r19605, r19604)
|
||||
- Fix: Industry generation failed for large maps and lots of industry types (r19652, r19643)
|
||||
- Fix: When a company is sold, move connected clients to spectators [FS#3745] (r19651)
|
||||
- Fix: A client would not be properly moved when moved while joining, e.g. when entering a company's password. This caused the client to be in the wrong company (according to the rest of the clients) and the client being kicked on the first command [FS#3760] (r19648)
|
||||
- Fix: Trains loaded above the original IDs did not have a default railtypelabel assigned to them, causing them to be unavailable. Could cause desyncs if the multiplayer game was not started from a savegame [FS#3768] (r19647)
|
||||
- Fix: Do not allow building cacti outside of the desert or rain forest trees outside of the rain forest area. This to prevent people from thinking planting rain forest trees makes the rain forest bigger and thus adds more place to build a lumber mill [FS#3728] (r19644, r19635, r19634)
|
||||
- Fix: Desync when taking over companies (r19636)
|
||||
- Fix: Chat message caused glitch when rejoining a network game [FS#3757] (r19629)
|
||||
- Fix: Desync when a command is received and in the queue while a client starts joining, i.e. save the game state. This can happen in two ways: with frame_freq > 1 a command received in a previous frame might not be executed yet or when a command is received in the same frame as the join but before the savegame is made. In both cases the joining client would not get all commands to get in-sync with the server (and the other clients) (r19620)
|
||||
- Fix: Company related graphs were not updated correctly after changing the company colour [FS#3763] (r19615)
|
||||
- Fix: Possible invalid read when server moves client to spectators before he finishes joining [FS#3755] (r19613)
|
||||
- Fix: Crash when opening a savegame with a waypoint from around 0.4.0 [FS#3756] (r19612)
|
||||
- Fix: Improve joining behaviour; kicking clients when entering passwords that was just cleared, 'connection lost' for people failing the password, access restriction circumvention [CVE-2010-0401] [FS#3754] (r19610, r19609, r19608, r19607, r19606)
|
||||
- Fix: Desync debugging; false positives in the cache validity checks and saving/loading the command stream (r19619, r19617, r19602, r19601, r19600, r19596, r19593, r19592, r19589, r19587, r19586)
|
||||
- Fix: Presence of online content was not properly updated after download due to duplicate slashes in the path (r19600)
|
||||
- Fix: [NewGRF] Setting industry prop 0x24 to 0 caused empty station names (r19590)
|
||||
- Fix: Crash when pressing 'h' (non-stop) in the order window of a ship or aircraft [FS#3744] (r19584)
|
||||
- Fix: Graphs were not properly updated when going toggling keys (i.e. companies) (r19574)
|
||||
- Fix: The timetable button was not automatically raised [FS#3739] (r19571)
|
||||
- Fix: [NewGRF] Possible buffer underflow in NewGRF string code (r19569)
|
||||
- Fix: [NewGRF] Do not return a random colour for unowned industries in var 45; TTDPatch does not seem to set the colour data in that case either and it could lead to desyncs (r19566)
|
||||
- Fix: Window::OnResize() was not always called while resizing a window causing incorrect windows [FS#3730] (r19563, r19558)
|
||||
- Fix: Bridge build error message should not show the same message twice (r19560, r19559)
|
||||
- Fix: [NewGRF] During NewGRF loading, store rail type labels in temporary data and process after loading has finished. This avoids deactivated rail vehicles being reactivated if the climate property is set after the rail type property (r19557, r19502)
|
||||
- Fix: Improperly scaled cargo payment graph when having lots of cargo (r19550, 19543)
|
||||
- Fix: [NewGRF] Properties set before property 08 (house, industry, industry tiles) should be ignored, not trigger the NewGRF to be disabled [FS#3725] (r19547)
|
||||
- Fix: Sorting industries by production was broken for NewGRF industries (r19538)
|
||||
- Fix: Vehicle details window did not resize correctly after refitting a road vehicle to a longer variant [FS#3720] (r19533)
|
||||
- Fix: Prevent drawing industries disabled at the smallmap as land tiles when they are built on water (r19523)
|
||||
- Fix: Tunnels, bridges and roadstops are build with only one roadtype (r19506)
|
||||
- Fix: Remove same_industry_close setting did not do what it said and caused NewGRF trouble (r19499)
|
||||
- Fix: Keep number padding intact when cloning vehicle names [FS#3710] (r19498)
|
||||
- Fix: [NewGRF] Bytes and words get sign-extended for temporary/persistent storage (r19497)
|
||||
- Fix: Stop reducing the size of the vehicle list after selecting a vehicle with a long description (r19480)
|
||||
- Fix: Implement custom sound effect for helicopter take-off [FS#3668] (r19364)
|
||||
- Update: Plural type of Slovak (r19452)
|
||||
|
||||
|
||||
1.0.0 (2010-04-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Network clients would crash while connecting to a server with AIs (r19526)
|
||||
- Fix: [NPF] Crash when finding a waypoint before finding the closest depot [FS#3703] (r19460)
|
||||
|
||||
|
||||
1.0.0-RC3 (2010-03-18)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Append rail type speed limit (if set) to rail type selection list, and toolbar title (r19431)
|
||||
- Feature: [NewGRF] Smallmap colours for railtypes (r19307)
|
||||
- Change: Make the drive through and cargo list consistency checks only run when 'desync' debugging is enabled (r19403, r19398)
|
||||
- Change: Update documentation for console command connect to use ip:port#company parameter format, in line with command line help (r19374)
|
||||
- Change: [NewGRF] Increase railtype cost range (r19306)
|
||||
- Fix: Mark industry windows dirty more often [FS#3701] (r19443)
|
||||
- Fix: Custom group names are misaligned with default ones when using rtl languages [FS#3700] (r19438)
|
||||
- Fix: With certain game settings one could clear tiles for free when building long roads (r19436)
|
||||
- Fix: When loading a savegame created with a house NewGRF without that NewGRF available all houses became tall office blocks (r19435)
|
||||
- Fix: Limit rail clearance earnings to 3/4s of rail build cost, to avoid money making loophole when rail build cost is less than rail removal earnings (r19433)
|
||||
- Fix: Crash when the error message 'owned by <town>' was shown [FS#3696] (r19432)
|
||||
- Fix: [NoAI] When the title game contains an AIPL block the AI settings where overwritten by those from the title game (r19429)
|
||||
- Fix: Gracefully handle the case where we cannot open a .tar file (r19427)
|
||||
- Fix: [YAPP] A train on a bridge/tunnel was not always found when checking for trains on a reserved path (r19425)
|
||||
- Fix: [NoAI] The AI Debug window did not open if an AI or library fails to compile when loading a savegame [FS#3669] (r19395)
|
||||
- Fix: One could not level the whole map anymore at once (r19392)
|
||||
- Fix: Only show the 'No AIs available' error message when explicitly changing the number of AI opponents [FS3676] (r19389)
|
||||
- Fix: [NoAI] When reloading a savegame, an AI failing to compile could trigger (trying) to read the not yet loaded information of another AI via the AI Debug window and its 'open with the most recently used AI' feature [FS#3666] (r19388)
|
||||
- Fix: Close all orders windows when switching companies [FS#3671] (r19387)
|
||||
- Fix: [IPv6] Netmask calculations were wrong if cidr >= 32 [FS#3684] (r19385)
|
||||
- Fix: Overbuilding bridges, rail stations did not properly update PBS reservation [FS#3680] (r19384, r19383)
|
||||
- Fix: [NoAI] List valuator could cause invalid iterators [FS#3665] (r19367)
|
||||
- Fix: Close error messages about missing ownership when the company closes or is taken over [FS#3663] (r19358, r19357)
|
||||
|
||||
|
||||
1.0.0-RC2 (2010-03-04)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [YAPF] Consider the railtype imposed speed limit for pathfinding (r19301)
|
||||
@@ -253,7 +59,7 @@
|
||||
- Fix: Crash when a baseset has an empty metadata field (r19095)
|
||||
- Fix: Possible read/write after free when the client triggered the server to close the connection [FS#3599] (r19072)
|
||||
- Fix: Remove Bidi control characters from the reordered text so they are not drawn [FS#3604] (r19067)
|
||||
- Fix: [NewGRF] Settings that are part of the 'TTDPatch flags' can cause desyncs if they are changed in network games (r19066)
|
||||
- Fix: [NewGRF] Settings that are part of the "TTPatch flags" can cause desyncs if they are changed in network games (r19066)
|
||||
- Fix: When banning yourself via rcon do not send the 'command response' to the client as the connection has already been terminated [FS#3598] (r19054)
|
||||
- Fix: Mass stopping/starting/autoreplacing gave empty errors when there were no vehicles [FS#3577] (r19024)
|
||||
- Fix: City airport introduction date had become 5 years later (r19023)
|
||||
@@ -510,7 +316,7 @@
|
||||
- Fix: Some inconsistencies with the difficulty settings in the scenario editor. Also re-enable changing some difficulty settings (e.g. max loan) in the scenario editor [FS#3219] (r17644)
|
||||
- Fix: Do not accept cargo produced in the same industry; generalise and improve the check used only for valuables (r17437)
|
||||
- Fix: Pay only for cargo actually delivered, not for all cargo unloaded at station; can differ with 'stockpiling' industries (r17436)
|
||||
- Fix: Improve movement of aircraft; do not make turns bigger than 45 degrees while in flight, do not move while turning on the ground (r17415, r17405)
|
||||
- Fix: Improve movement of aircraft; do not make turns bigger then 45 degrees while in flight, do not move while turning on the ground (r17415, r17405)
|
||||
- Fix: Crash in order GUI when changing some orders with both the mouse and keyboard at the exact same time [FS#2859] (r17384)
|
||||
- Fix: Trains would not show smoke if the load/unload counter was not 0, though there does not seem to be a reason to check that variable anyhow anymore [FS#3162] (r17352)
|
||||
- Fix: One was not offered to take over bankrupt companies anymore; caused by the introduction NoAI, although NewAI had the same problem too [FS#2769] (r17345)
|
||||
@@ -1700,7 +1506,7 @@
|
||||
- Codechange: Add new vehicle hash table for collision detection and finding vehicles on a tile. The hash area scanned is far smaller than the old hash table, which is now used for viewport updates only. This should give a significant performance improvement for games with many vehicles (r10111)
|
||||
- Codechange: Do not redraw all station tiles when cargo is added or removed if the station has no custom graphics (r10062)
|
||||
- Codechange: Add some support for NewGRF var 7D, temporary storage array (r9707)
|
||||
- Codechange: Add support for returning 'TTDPatch variables' (Action D) (r9701)
|
||||
- Codechange: Add support for returning 'ttdpatch variables' (Action D) (r9701)
|
||||
- Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static (r9671 and several others)
|
||||
- Codechange: Add support for multiple 'base' directories for NewGRF searching (r9560)
|
||||
- Codechange: Implement actions 1/2/3 for cargoes, callback handler and custom icon sprites (rmany)
|
||||
@@ -2470,7 +2276,7 @@
|
||||
- Fix: Incorrect validating of tree-planting command which can allow a buffer-overflow (r3446)
|
||||
- Fix: [NewGRF] When changing the sprite ID of a vehicle, if it is not FD (custom graphics), the value needs to changed from a 16bit array offset to an array index. (fixes tropicstw.grf) (r3449)
|
||||
- Fix: You could not remove an item from a list-type of config ingame from the configuration file (r3475)
|
||||
- Fix: [NewGRF] Always reinitialize the TTDPatch flags as patch settings may have changed (r3486)
|
||||
- Fix: [NewGRF] Always reinitialize the ttdpatch flags as patch settings may have changed (r3486)
|
||||
- Fix: Price for demolishing a bridge was dependent on orientation and map size (r3487)
|
||||
|
||||
|
||||
@@ -2663,7 +2469,7 @@
|
||||
- Fix: [Network] 'kick 1' did crash dedicated servers
|
||||
- Fix: [Network] A server no longer crashes when a client sends an invalid DoCommand, but drops the client instead
|
||||
- Fix: [Network] Added packet protection. No longer a client or server
|
||||
- Fix: [Network] Bug in bind system. Advertising failed on systems with more than 1 ip, and server_bind active to one of them
|
||||
- Fix: [Network] Bug in bind system. Advertising failed on systems with more then 1 ip, and server_bind active to one of them
|
||||
- Fix: [Network] Disabled 'money-cheat' (read: bug which could give people a lot of money)
|
||||
- Fix: [SDL] Now the binary never links to SDL if DEDICATED is set
|
||||
- Fix: [Windows] Somehow mousewheel was disabled on windows using SDL; reenabled again
|
||||
|
||||
+3
-18
@@ -11,7 +11,7 @@ log() {
|
||||
}
|
||||
|
||||
set_default() {
|
||||
released_version="1.0.3"
|
||||
released_version="1.0.0-RC2"
|
||||
|
||||
ignore_extra_parameters="0"
|
||||
# We set all kinds of defaults for params. Later on the user can override
|
||||
@@ -55,8 +55,8 @@ set_default() {
|
||||
enable_static="1"
|
||||
enable_translator="0"
|
||||
enable_unicode="1"
|
||||
enable_assert="0"
|
||||
enable_strip="1"
|
||||
enable_assert="1"
|
||||
enable_strip="0"
|
||||
enable_universal="1"
|
||||
enable_osx_g5="0"
|
||||
enable_cocoa_quartz="1"
|
||||
@@ -2304,20 +2304,6 @@ detect_library() {
|
||||
if [ -z "$res" ]; then
|
||||
log 2 " trying /usr/local/include/$4$5... no"
|
||||
fi
|
||||
if [ -z "$res" ] && [ "$os" = "NETBSD" ]; then
|
||||
eval "$2=`ls -1 /usr/pkg/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
|
||||
eval "res=\$$2"
|
||||
if [ -z "$res" ]; then
|
||||
log 2 " trying /usr/pkg/include/$4$5... no"
|
||||
fi
|
||||
fi
|
||||
if [ -z "$res" ] && [ "$os" = "HAIKU" ]; then
|
||||
eval "$2=`ls -1 /boot/common/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
|
||||
eval "res=\$$2"
|
||||
if [ -z "$res" ]; then
|
||||
log 2 " trying /boot/common/include/$4$5... no"
|
||||
fi
|
||||
fi
|
||||
|
||||
eval "res=\$$2"
|
||||
if [ -n "$res" ] && ( [ -n "$force_static" ] || ( [ "$enable_static" != "0" ] && [ "$os" != "OSX" ] ) ); then
|
||||
@@ -3168,7 +3154,6 @@ showhelp() {
|
||||
echo " --with-midi=midi define which midi-player to use"
|
||||
echo " --with-midi-arg=arg define which args to use for the"
|
||||
echo " midi-player"
|
||||
echo " --with-libtimidity enables libtimidity support"
|
||||
echo " --with-allegrol[=allegro-config]"
|
||||
echo " enables Allegro video driver support"
|
||||
echo " --with-cocoa enables COCOA video driver (OSX ONLY)"
|
||||
|
||||
@@ -23,7 +23,7 @@ Multiplayer Manual for OpenTTD (0.3.5)
|
||||
- If you want to see which servers all online on the Internet, click on 'Internet'
|
||||
and 'Find Server'
|
||||
|
||||
- If there were more than one server
|
||||
- If there were more then one server
|
||||
- select one in the list below the buttons
|
||||
- click on 'join game'
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.Dd Apr 01, 2010
|
||||
.Dd Jan 18, 2010
|
||||
.Dt OPENTTD 6
|
||||
.Sh NAME
|
||||
.Nm openttd
|
||||
|
||||
+2
-8
@@ -1,6 +1,6 @@
|
||||
OpenTTD's known bugs
|
||||
Last updated: 2010-08-01
|
||||
Release version: 1.0.3
|
||||
Last updated: 2010-03-04
|
||||
Release version: 1.0.0-RC2
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -34,11 +34,6 @@ that you can find at: http://bugs.openttd.org
|
||||
If the bugs are closed but still listed here it means that the bug is fixed
|
||||
and that the nightlies and next major release will not have that bug.
|
||||
|
||||
- 3938 DirectMusic not properly resetting state causing music to sound wrong
|
||||
- 3935 Under some circumstances two road vehicles can leave road stop simultaniously
|
||||
- 3816 Console text does not always fit at 640x480
|
||||
- 3746 Console output with right-to-left texts in left-to-right texts is not correct
|
||||
- 3714 Some corrupted savegames can cause crashes
|
||||
- 3651 [OSX] Crash when selecting full screen
|
||||
- 3648 [OSX] Crash when selecting music
|
||||
- 3637 Second highest competing station gets penalised twice
|
||||
@@ -140,7 +135,6 @@ Duplicate (station) names after renaming [FS#3204]
|
||||
to the automatically generated names.
|
||||
|
||||
Extreme CPU usage/hangs when using SDL and PulseAudio [FS#3294]
|
||||
OpenTTD hangs/freezes when closing, OpenTTD is slow, OpenTTD uses a lot of CPU
|
||||
OpenTTD can be extremely slow/use a lot of CPU when the sound is
|
||||
played via SDL and then through PulseAudio's ALSA wrapper. Under the
|
||||
same configuration OpenTTD, or rather SDL, might hang when exiting
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
Type=Application
|
||||
Version=1.1
|
||||
Name=!!MENU_NAME!!
|
||||
Comment=A clone of Transport Tycoon Deluxe
|
||||
Icon=openttd
|
||||
Exec=!!TTD!!
|
||||
Terminal=false
|
||||
Categories=!!MENU_GROUP!!
|
||||
Comment=A clone of Transport Tycoon Deluxe
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Awk script to automatically generate a single comment line
|
||||
# for a translated desktop shortcut. If it does not exist there
|
||||
# is no output.
|
||||
#
|
||||
|
||||
/##isocode/ { lang = $2; next }
|
||||
/STR_DESKTOP_SHORTCUT_COMMENT/ { sub("^[^:]*:", "", $0); print "Comment[" lang "]=" $0; next}
|
||||
@@ -1,25 +0,0 @@
|
||||
openttd (1.0.0~rc3-2) unstable; urgency=low
|
||||
|
||||
The openttd package has been moved from contrib into main. Since the
|
||||
OpenGFX free graphics set has been packaged for Debian, one can now run
|
||||
OpenTTD without needing any of the resources from the original game
|
||||
(though the original resources are still supported).
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 18 Mar 2010 13:09:35 +0100
|
||||
|
||||
openttd (0.7.0-1) unstable; urgency=low
|
||||
|
||||
Handling of AI players has changed in 0.7.0. This package no longer
|
||||
contains any AI players, so playing against the computer is not possible
|
||||
out of the box any longer. However, you can easily download AI players
|
||||
through the new "Content Downloading Service", after which playing with
|
||||
computer players is possible.
|
||||
|
||||
Loading old savegames with computer players is supported (AI players will
|
||||
be converted according to the current AI settings), but at this moment
|
||||
there are no AIs that completely handle any existing infrastructure built
|
||||
by the old AI, so starting a new game might be more fun (especially since
|
||||
most of the new AIs are a lot less erratic).
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 13 Apr 2009 15:11:20 +0200
|
||||
|
||||
+16
-26
@@ -2,38 +2,28 @@ OpenTTD for Debian
|
||||
------------------
|
||||
|
||||
To properly play this game, you need a base graphics and sound set.
|
||||
Currently, the graphics, sound and music files from the original
|
||||
Transport Tycoon Deluxe game (Windows and DOS versions) are supported,
|
||||
as well as the free graphics replacement set "OpenGFX", sound
|
||||
replacement set "OpenSFX" (which is in non-free due to a restrictive
|
||||
license) and the free music replacement set "OpenMSX".
|
||||
Currently, the graphics files from the original Transport Tycoon Deluxe
|
||||
game (Windows and DOS versions) are supported, as well as the free
|
||||
graphics replacement set "OpenGFX".
|
||||
|
||||
Normally, installing the openttd package should automatically install
|
||||
openttd-opengfx as well, allowing OpenTTD to run out of the box. If you
|
||||
want sound, you'll have to enable non-free sources and install the
|
||||
openttd-opensfx package manually (or install the original Transport
|
||||
Tyccon Deluxe sound files).
|
||||
See readme.txt, section 4.1 for instructions on how to install these
|
||||
files.
|
||||
|
||||
The easiest way to install the OpenMSX music files is to use the in-game
|
||||
content download system, which should offer the latest version of the
|
||||
music files.
|
||||
-Music
|
||||
For in game music (optional), you should copy all files in the gm/
|
||||
subdir of your ttd installation to /usr/share/games/openttd/gm. You
|
||||
should also install timidity and a soundfont (freepats is packaged in
|
||||
Debian and works out of the box).
|
||||
|
||||
To find out how to install the original Transport Tycoon Deluxe graphics
|
||||
sound files and music files, see readme.txt, section 4.1.
|
||||
|
||||
-Playing Music
|
||||
In addition to installing a music set (see above), you'll also need
|
||||
to install the timidity midi player, available in the timidity
|
||||
package.
|
||||
|
||||
Remember that not all audio devices support multiple audiostreams
|
||||
(music and sound), so you might have to use alsa software mixing or
|
||||
pulseaudio.
|
||||
Don't forget to use -m extmidi if you want music, and if you have
|
||||
problems, remember that not all audio devices support multiple
|
||||
audiostreams (music and sound), so you might have to use alsa
|
||||
software mixing or pulseaudio.
|
||||
|
||||
-Scenarios
|
||||
There are no scenarios included in this release. Scenarios can be
|
||||
downloaded using OpenTTD's content service, which is available from
|
||||
OpenTTD's main menu. If you have obtained a scenario through other
|
||||
downloaded using openttd's content service, which is available from
|
||||
openttd's main menu. If you have obtained a scenario through other
|
||||
means, you can place it either in your ~/.openttd/scenario directory
|
||||
or in the system-wide /usr/share/games/openttd/scenario directory.
|
||||
|
||||
|
||||
+142
-192
@@ -1,202 +1,152 @@
|
||||
openttd (1.0.3-0) unstable; urgency=low
|
||||
openttd (1.0.0~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.0.3
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 01 Aug 2010 00:00:00 +0000
|
||||
|
||||
openttd (1.0.3~rc1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.0.3-RC1
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sat, 05 Jul 2010 17:37:21 +0000
|
||||
|
||||
openttd (1.0.2-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.0.2
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sat, 19 Jun 2010 18:36:21 +0000
|
||||
|
||||
openttd (1.0.2~rc1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.0.2-RC1
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sat, 05 Jun 2010 23:36:21 +0000
|
||||
|
||||
openttd (1.0.1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.0.1
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sat, 01 May 2010 00:00:00 +0200
|
||||
|
||||
openttd (1.0.1~rc2-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.0.1-RC2
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 21 Apr 2010 21:36:21 +0200
|
||||
|
||||
openttd (1.0.1~rc1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.0.1-RC1
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sat, 17 Apr 2010 23:36:21 +0000
|
||||
|
||||
openttd (1.0.0-1) unstable; urgency=low
|
||||
|
||||
* [30a2162] New upstream release 1.0.0. (Closes: #570104)
|
||||
* [102698a] Make openttd-wrapper work with older mktemp versions.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 02 Apr 2010 23:36:21 +0200
|
||||
|
||||
openttd (1.0.0~rc3-2) unstable; urgency=low
|
||||
|
||||
* [279c5ef] Recommend openttd-opengfx and suggest openttd-opensfx.
|
||||
* [9330ad7] Update README.Debian concerning music files.
|
||||
* [07bde24] Move openttd from contrib to main. (Closes: #560810)
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 18 Mar 2010 13:16:32 +0100
|
||||
|
||||
openttd (1.0.0~rc3-1) unstable; urgency=low
|
||||
|
||||
* [412d153] New upstream release 1.0.0~rc3.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 18 Mar 2010 10:09:33 +0100
|
||||
|
||||
openttd (1.0.0~rc2-1) unstable; urgency=low
|
||||
|
||||
* [9c99af4] New upstream release 1.0.0~rc2.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 04 Mar 2010 12:22:28 +0100
|
||||
|
||||
openttd (1.0.0~rc1-1) unstable; urgency=low
|
||||
|
||||
* [fe4eb51] New upstream release 1.0.0~rc1.
|
||||
* [6aa2be0] Note that the embedded md5 implementation has a different
|
||||
license.
|
||||
* [39eb336] Remove lintian override for empty gm directory.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 19 Feb 2010 13:00:53 +0100
|
||||
|
||||
openttd (1.0.0~beta4-1) unstable; urgency=low
|
||||
|
||||
* [6718224] New upstream release 1.0.0~beta4.
|
||||
* [7b0fa8d] Remove some more docs that we don't want in the package.
|
||||
* [bb9d744] Use liblzo2 instead of an embedded minilzo version.
|
||||
* [949c06b] Explicitly disable iconv support.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 19 Feb 2010 12:59:27 +0100
|
||||
|
||||
openttd (0.7.5-4) unstable; urgency=low
|
||||
|
||||
* [174d0b1] Don't use deprecated < in Replaces.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 15 Feb 2010 00:35:33 +0100
|
||||
|
||||
openttd (0.7.5-3) unstable; urgency=low
|
||||
|
||||
* [d12fc5a] Make openttd-data replace openttd (< 0.7.5-2).
|
||||
(Closes: #569679)
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 14 Feb 2010 16:56:31 +0100
|
||||
|
||||
openttd (0.7.5-2) unstable; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* [fbab21d] Switch to source format 3.0 (quilt).
|
||||
* [85c0c7d] No longer check for (and complain about missing) datafiles
|
||||
on installation and upgrades. (Closes: #524651, 562574)
|
||||
* [827eb61] Split the architecture independent data into openttd-data.
|
||||
(Closes: #492462)
|
||||
* [6fbd9c7] Update README.Debian.
|
||||
* [76a5148] Support cross compilation. (Closes: #550951)
|
||||
* [2005bf8] Simplify the rules file, make debhelper do more stuff.
|
||||
* [fc0500e] Remove some configure arguments.
|
||||
* [8ca38bb] Explicitly enable or disable all of the dependencies.
|
||||
* [e38fb3e] Let the upstream Makefile install documentation.
|
||||
* [5954fcf] Update the watch file to the new upstream url scheme.
|
||||
* [7249594] Fix typo in copyright file.
|
||||
* [660fb61] Bump the Standards-Version to 3.8.4, with no changes
|
||||
required.
|
||||
* [f94ab89] Move the packaging git repository to git.debian.org.
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Tue, 09 Feb 2010 21:40:24 +0100
|
||||
|
||||
openttd (0.7.5-1) unstable; urgency=high
|
||||
|
||||
* [cdcb73a] Imported Upstream version 0.7.5. This release fixes
|
||||
CVE-2009-4007.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 24 Dec 2009 00:55:45 +0100
|
||||
|
||||
openttd (0.7.4-1) unstable; urgency=low
|
||||
|
||||
* [a2c297b0] Imported Upstream version 0.7.4
|
||||
* [0232a645] Make Debian-specific patches executable.
|
||||
* [76be04b] Switch the Debian packaging to git.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 15 Dec 2009 22:11:52 +0100
|
||||
|
||||
openttd (0.7.3-1) unstable; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release
|
||||
* Use printf instead of echo -en in openttd-wrapper to make it POSIX
|
||||
compatible (Closes: #547758).
|
||||
* Remove three patches that are now included in upstream.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 01 Oct 2009 22:52:59 +0200
|
||||
|
||||
openttd (0.7.2-1) unstable; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release
|
||||
* Bump Standards-Version to 3.8.3, with no changes required.
|
||||
* Clean up the rules file a bit and add some lintian overrides.
|
||||
* Explain why openttd is in contrib (Closes: #539381).
|
||||
* Add the DM-Upload-Allowed control field.
|
||||
* Re-add dpatch infrastructure.
|
||||
* Fix the copyright file, since upstream only allows GPLv2, not later
|
||||
versions.
|
||||
* Add a section to the copyright file on the different license used by the
|
||||
"Squirrel" programming language, which is shipped with OpenTTD since
|
||||
0.7.0.
|
||||
* Backport upstream r17226, which removes the deprecated Encoding entry from
|
||||
the .desktop file.
|
||||
* Add a wrapper script for openttd, which captures any stderr output and
|
||||
displays it when openttd returns an error code (Closes: #533557).
|
||||
* Recommend x11-utils, since we use xmessage for displaying errors. Don't
|
||||
depend on it, since openttd will still run fine without it, you just won't
|
||||
see any errors.
|
||||
* Backport upstream r17227 and r17229, which prevents terminal escape codes
|
||||
from ending up in the captured error output.
|
||||
* Backport upstream r17240, which improves stderr output when files are
|
||||
missing or corrupt.
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Fri, 21 Aug 2009 15:27:26 +0200
|
||||
|
||||
openttd (0.7.1-1) unstable; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release.
|
||||
* Link against libicu to enable right-to-left language support.
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Tue, 09 Jun 2009 21:46:28 +0200
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 04 Mar 2010 00:01:02 +0100
|
||||
|
||||
openttd (0.7.0-1) unstable; urgency=low
|
||||
openttd (1.0.0~RC1) unstable; urgency=low
|
||||
|
||||
[ Matthijs Kooijman ]
|
||||
* New upstream release.
|
||||
* Remove Debian specific desktop file, upstream provides one now.
|
||||
* Add debian/watch file.
|
||||
|
||||
[ Jordi Mallach ]
|
||||
* Bump Standards-Version to 3.8.1, with no changes required.
|
||||
* Move to debhelper compat 7. Bump Build-Depends accordingly.
|
||||
* Use dh_prep.
|
||||
* Add "set -e" to config script.
|
||||
* Remove a few extra doc files that get installed by upstream Makefile.
|
||||
* Add more complete copyright information.
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 18 Feb 2010 00:01:02 +0100
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Wed, 15 Apr 2009 18:22:10 +0200
|
||||
openttd (1.0.0~beta4) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 04 Feb 2010 18:36:02 +0100
|
||||
|
||||
openttd (1.0.0~beta3) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 21 Jan 2010 00:01:02 +0100
|
||||
|
||||
openttd (1.0.0~beta2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 05 Jan 2010 21:36:51 +0100
|
||||
|
||||
openttd (1.0.0~beta1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 24 Dec 2009 01:01:01 +0100
|
||||
|
||||
openttd (0.7.5) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 23 Dec 2009 20:52:34 +0100
|
||||
|
||||
openttd (0.7.5~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 14 Dec 2009 19:28:37 +0100
|
||||
|
||||
openttd (0.7.4) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 01 Dec 2009 01:23:45 +0100
|
||||
|
||||
openttd (0.7.4~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 15 Nov 2009 16:30:07 +0100
|
||||
|
||||
openttd (0.7.3) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 01 Oct 2009 12:35:47 +0200
|
||||
|
||||
openttd (0.7.3~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 24 Sep 2009 21:30:43 +0200
|
||||
|
||||
openttd (0.7.3~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 13 Sep 2009 10:25:56 +0200
|
||||
|
||||
openttd (0.7.2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sat, 01 Aug 2009 00:19:43 +0200
|
||||
|
||||
openttd (0.7.2~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 21 Jul 2009 20:25:56 +0200
|
||||
|
||||
openttd (0.7.2~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 15 Jul 2009 22:25:56 +0200
|
||||
|
||||
openttd (0.7.1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 09 Jun 2009 01:34:56 +0200
|
||||
|
||||
openttd (0.7.1~RC3) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 03 Jun 2009 15:34:56 +0200
|
||||
|
||||
openttd (0.7.1~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 21 Mar 2009 14:34:56 +0200
|
||||
|
||||
openttd (0.7.1~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 11 Mar 2009 17:34:56 +0200
|
||||
|
||||
openttd (0.7.0) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 01 Apr 2009 13:37:42 +0000
|
||||
|
||||
openttd (0.7.0~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 23 Mar 2009 00:42:00 +0200
|
||||
|
||||
openttd (0.7.0~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 16 Mar 2009 00:07:00 +0200
|
||||
|
||||
openttd (0.7.0~beta2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 10 Mar 2009 00:33:05 +0100
|
||||
|
||||
openttd (0.7.0~beta1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 16 Feb 2009 23:07:05 +0100
|
||||
|
||||
openttd (0.6.3-1) unstable; urgency=low
|
||||
|
||||
@@ -205,7 +155,7 @@ openttd (0.6.3-1) unstable; urgency=low
|
||||
|
||||
[ Jordi Mallach ]
|
||||
* Add Spanish Debconf template translation, after fixing its corrupted
|
||||
encoding (thanks, Germana Oliveira, closes: #499214).
|
||||
encoding.
|
||||
|
||||
-- Jordi Mallach <jordi@debian.org> Thu, 02 Oct 2008 16:59:03 +0200
|
||||
|
||||
|
||||
+7
-21
@@ -1,10 +1,9 @@
|
||||
Source: openttd
|
||||
Section: games
|
||||
Section: contrib/games
|
||||
Priority: optional
|
||||
Maintainer: Matthijs Kooijman <matthijs@stdin.nl>
|
||||
Uploaders: Jordi Mallach <jordi@debian.org>
|
||||
DM-Upload-Allowed: yes
|
||||
Build-Depends: debhelper (>= 7.0.50), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, libicu-dev, liblzo2-dev
|
||||
Build-Depends: debhelper (>= 7.0.50), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, liblzo2-dev, libicu-dev
|
||||
Standards-Version: 3.8.4
|
||||
Vcs-Browser: http://git.debian.org/?p=collab-maint/openttd.git
|
||||
Vcs-Git: git://git.debian.org/collab-maint/openttd.git
|
||||
@@ -13,25 +12,12 @@ Homepage: http://www.openttd.org/
|
||||
Package: openttd
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: openttd-opengfx, x11-utils
|
||||
Replaces: openttd-data
|
||||
Conflicts: openttd-data
|
||||
Suggests: openttd-opensfx, timidity, freepats
|
||||
Suggests: timidity, freepats
|
||||
Description: reimplementation of Transport Tycoon Deluxe with enhancements
|
||||
OpenTTD is a reimplementation of the Microprose game "Transport
|
||||
Tycoon Deluxe" with lots of new features and enhancements.
|
||||
.
|
||||
OpenTTD is playable with the free graphics files from the openttd-opengfx
|
||||
package and optional sound files from the openttd-opensfx package (which is in
|
||||
non-free). Alternatively, OpenTTD can use the graphics files from the original
|
||||
Transport Tycoon Deluxe game (See README.Debian on how to set this up).
|
||||
|
||||
Package: openttd-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: openttd (= ${binary:Version}), ${misc:Depends}
|
||||
Description: debugging symbols for openttd
|
||||
This package contains the debugging symbols for OpenTTD, the reimplementation
|
||||
of the Micropose game "Transport Tycoon Deluxe" with lots of new features and
|
||||
enhancements.
|
||||
Tycoon Deluxe" with lots of new features and enhancements. The data
|
||||
files of the original Transport Tycoon Deluxe for Windows are
|
||||
mandatory to play the game. They must be manually copied to the game
|
||||
data directory (see README.Debian for details).
|
||||
|
||||
+5
-21
@@ -1,6 +1,11 @@
|
||||
This package was debianized by Matthijs Kooijman <matthijs@stdin.nl>
|
||||
on Wed, 15 Sep 2004 00:24:01 +0200.
|
||||
|
||||
This package is not part of the main Debian GNU/Linux distribution, but
|
||||
uploaded to the contrib section. This is because the openttd program is
|
||||
non-functional by itself, it needs (non-free) graphical and sound
|
||||
resources from the Transport Tycoon Deluxe game to work.
|
||||
|
||||
Upstream author: Ludvig Strigeus (ludde) and many others.
|
||||
Upstream homepage: http://www.openttd.org
|
||||
|
||||
@@ -54,24 +59,3 @@ language, which is shipped under the following license:
|
||||
|
||||
3. This notice may not be removed or
|
||||
altered from any source distribution.
|
||||
|
||||
This package contains an implementation of the md5 hash algorithm, which
|
||||
is shipped under the following license:
|
||||
|
||||
Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
[DEFAULT]
|
||||
# Use pristine-tar
|
||||
pristine-tar = True
|
||||
|
||||
[git-dch]
|
||||
# We use metaheaders in commit messages.
|
||||
meta = True
|
||||
# Put git commit ids in the debian changelog.
|
||||
id-length = 7
|
||||
|
||||
[git-import-orig]
|
||||
# Use a custom commit message for upstream imports.
|
||||
import-msg = New upstream release %(version)s.
|
||||
@@ -2,10 +2,8 @@
|
||||
# This is a wrapper script that checks openttd's exit status and
|
||||
# displays its stderr output
|
||||
|
||||
# Get a file to capture stderr to. Use the deprecated -t option, so this
|
||||
# works on the old mktemp from the mktemp package (which has been
|
||||
# replaced by the version from the coreutils package).
|
||||
TMPFILE=`mktemp -t openttd.errout.XXXXXXXXX`
|
||||
# Get a file to capture stderr to
|
||||
TMPFILE=`mktemp --tmpdir openttd.errout.XXXXXXXXX`
|
||||
|
||||
if [ ! -w "$TMPFILE" ]; then
|
||||
xmessage "Could not create temporary file for error messages. Not starting OpenTTD."
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
From: Matthijs Kooijman <matthijs@stdin.nl>
|
||||
Subject: Use a wrapper script for running openttd
|
||||
|
||||
The wrapper script captures stderr from openttd and displays this in
|
||||
case of an error. This patch makes the the .desktop file call the
|
||||
wrapper instead of the openttd binary directly.
|
||||
|
||||
Index: media/openttd.desktop.in
|
||||
===================================================================
|
||||
--- a/media/openttd.desktop.in (revision 20124)
|
||||
+++ b/media/openttd.desktop.in (working copy)
|
||||
@@ -5,7 +5,7 @@
|
||||
Version=1.1
|
||||
Name=!!MENU_NAME!!
|
||||
Icon=openttd
|
||||
-Exec=!!TTD!!
|
||||
+Exec=/usr/share/games/openttd/openttd-wrapper
|
||||
Terminal=false
|
||||
Categories=!!MENU_GROUP!!
|
||||
Comment=A clone of Transport Tycoon Deluxe
|
||||
@@ -1 +0,0 @@
|
||||
run-openttd-wrapper.patch
|
||||
+1
-5
@@ -17,7 +17,7 @@ endif
|
||||
# to be explicit about the dependencies, in case we're not running in a
|
||||
# clean build root.
|
||||
override_dh_auto_configure:
|
||||
./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/openttd --without-allegro --with-zlib --with-sdl --with-png --with-freetype --with-fontconfig --with-icu --with-liblzo2 --without-iconv --disable-strip CFLAGS="$(CFLAGS) -g"
|
||||
./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/openttd --without-allegro --with-zlib --with-lzo2 --with-sdl --with-png --with-freetype --with-fontconfig --with-icu
|
||||
|
||||
# Do some extra installation
|
||||
override_dh_auto_install:
|
||||
@@ -41,7 +41,3 @@ override_dh_auto_test:
|
||||
# target, while there isn't.
|
||||
override_dh_auto_clean:
|
||||
[ ! -f Makefile ] || $(MAKE) mrproper
|
||||
|
||||
# We want to strip the debug informatiton into the -dbg package.
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=openttd-dbg
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
3.0 (quilt)
|
||||
@@ -1,5 +0,0 @@
|
||||
version=3
|
||||
|
||||
options=downloadurlmangle=s/(.*)\/index.html$/\1\/openttd-\1-source.tar.gz/ \
|
||||
http://master.binaries.openttd.org/releases/ \
|
||||
(\d+(?:\.\d+)*)/index.html
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
set OPENTTD_VERSION=1.0.3
|
||||
set OPENTTD_VERSION=1.0.0-RC2
|
||||
set OPENSFX_VERSION=0.8.0
|
||||
set NOSOUND_VERSION=0.8.0
|
||||
set OPENGFX_VERSION=0.7.0
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
Name: openttd
|
||||
Version: 1.0.3
|
||||
Version: 1.0.0
|
||||
Release: 1%{?dist}
|
||||
|
||||
Group: Amusements/Games
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Version numbers to update
|
||||
!define APPV_MAJOR 1
|
||||
!define APPV_MINOR 0
|
||||
!define APPV_MAINT 3
|
||||
!define APPV_BUILD 1
|
||||
!define APPV_EXTRA ""
|
||||
!define APPV_MAINT 0
|
||||
!define APPV_BUILD 5
|
||||
!define APPV_EXTRA "-RC2"
|
||||
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
|
||||
|
||||
@@ -39,7 +39,7 @@ Sub UpdateFiles(version)
|
||||
modified = Mid(version, InStrRev(version, Chr(9)) + 1)
|
||||
version = Mid(version, 1, InStr(version, Chr(9)) - 1)
|
||||
Else
|
||||
version = "1.0.3"
|
||||
version = "1.0.0-RC2"
|
||||
revision = 0
|
||||
modified = 1
|
||||
End If
|
||||
@@ -97,7 +97,7 @@ Function DetermineSVNVersion()
|
||||
Dim sTortoise
|
||||
' First, try with 32-bit architecture
|
||||
sTortoise = ReadRegistryKey("HKLM", "SOFTWARE\TortoiseSVN", "Directory", 32)
|
||||
If sTortoise = "" Or IsNull(sTortoise) Then
|
||||
If sTortoise = "" Then
|
||||
' No 32-bit version of TortoiseSVN installed, try 64-bit version (doesn't hurt on 32-bit machines, it returns nothing or is ignored)
|
||||
sTortoise = ReadRegistryKey("HKLM", "SOFTWARE\TortoiseSVN", "Directory", 64)
|
||||
End If
|
||||
|
||||
@@ -376,21 +376,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\lang\irish.txt"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating irish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
exit 0
"
|
||||
AdditionalDependencies="..\src\lang\english.txt;..\objs\strgen\strgen.exe"
|
||||
Outputs="..\bin\lang\irish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\lang\italian.txt"
|
||||
>
|
||||
|
||||
@@ -377,21 +377,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\lang\irish.txt"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating irish language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
exit 0
"
|
||||
AdditionalDependencies="..\src\lang\english.txt;..\objs\strgen\strgen.exe"
|
||||
Outputs="..\bin\lang\irish.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\lang\italian.txt"
|
||||
>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -273,7 +273,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -273,7 +273,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -271,7 +271,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -271,7 +271,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;ENABLE_AI;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
|
||||
+16
-27
@@ -1,6 +1,6 @@
|
||||
OpenTTD README
|
||||
Last updated: 2010-08-01
|
||||
Release version: 1.0.3
|
||||
Last updated: 2010-03-04
|
||||
Release version: 1.0.0-RC2
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -202,11 +202,10 @@ when using other versions of the game.
|
||||
|
||||
4.1.1) Free graphics and sound files
|
||||
------ -----------------------------
|
||||
The free data files, split into OpenGFX for graphics, OpenSFX for sounds and
|
||||
OpenMSX for music can be found at:
|
||||
The free data files, split into OpenGFX for graphics and OpenSFX for sounds
|
||||
can be found at:
|
||||
- http://bundles.openttdcoop.org/opengfx/releases/ for OpenGFX
|
||||
- http://bundles.openttdcoop.org/opensfx/releases/ for OpenSFX
|
||||
- http://bundles.openttdcoop.org/openmsx/releases/ for OpenMSX
|
||||
Please follow the readme of these packages about the installation procedure.
|
||||
The Windows installer can optionally download and install these packages.
|
||||
|
||||
@@ -226,10 +225,9 @@ You need to copy the following files:
|
||||
|
||||
4.1.3) Original Transport Tycoon Deluxe music
|
||||
------ --------------------------------------
|
||||
If you want the Transport Tycoon Deluxe music, copy the gm/ folder from the
|
||||
Windows version of Transport Tycoon Deluxe to your OpenTTD folder (not your
|
||||
data folder - also explained in the following sections). The music from the
|
||||
DOS version as well as the original Transport Tycoon does not work.
|
||||
If you want the TTD music, copy the gm/ folder from the Windows version
|
||||
of TTD to your OpenTTD folder (not your data folder - also explained in
|
||||
the following sections). The music from the DOS version does not work.
|
||||
|
||||
4.1.4) AIs
|
||||
------ ---
|
||||
@@ -249,13 +247,9 @@ wait for an error message to pop up. The error message will tell you
|
||||
4.2) OpenTTD directories
|
||||
---- -------------------------------
|
||||
|
||||
The required 3rd party files listed in the section 4.1 "(Required) 3rd party files"
|
||||
as well as other non-compulsory extensions (NewGRFs, AI, heightmaps, scenarios) can be
|
||||
placed in a few different locations:
|
||||
The TTD artwork files listed in the section 4.1 "(Required) 3rd party files"
|
||||
can be placed in a few different locations:
|
||||
1. The current working directory (from where you started OpenTTD)
|
||||
For non-Windows operating systems OpenTTD will not scan for files in this
|
||||
directory if it is your personal directory, i.e. "~/", or when it is the
|
||||
root directory, i.e. "/".
|
||||
2. Your personal directory
|
||||
Windows: C:\My Documents (95, 98, ME)
|
||||
C:\Documents and Settings\<username>\My Documents\OpenTTD (2000, XP)
|
||||
@@ -307,9 +301,9 @@ again, see section 4.1).
|
||||
5.0) OpenTTD features:
|
||||
---- -----------------
|
||||
|
||||
OpenTTD has a lot of features going beyond the original Transport Tycoon Deluxe
|
||||
emulation. Unfortunately, there is currently no comprehensive list of features,
|
||||
but there is a basic features list on the web, and some optional features can be
|
||||
OpenTTD has a lot of features going beyond the original TTD emulation.
|
||||
Unfortunately, there is currently no comprehensive list of features, but there
|
||||
is a basic features list on the web, and some optional features can be
|
||||
controlled through the Advanced Settings dialog. We also implement some
|
||||
features known from TTDPatch (http://www.ttdpatch.net/).
|
||||
|
||||
@@ -340,8 +334,7 @@ Information logged:
|
||||
* Adding / removing / changing order of NewGRFs
|
||||
* Changing NewGRF parameters, loading compatible NewGRF
|
||||
* Changing game mode (scenario editor <-> normal game)
|
||||
* Loading game saved in a different OpenTTD / TTDPatch / Transport Tycoon Deluxe /
|
||||
original Transport Tycoon version
|
||||
* Loading game saved in a different OpenTTD / TTDPatch / TTD version
|
||||
* Running a modified OpenTTD build
|
||||
* Changing settings affecting NewGRF behaviour (non-network-safe settings)
|
||||
* Changing landscape (by cheat)
|
||||
@@ -515,12 +508,8 @@ debugging messages. This is mostly undocumented so best is to look in the
|
||||
source code file debug.c for the various debugging types. For more information
|
||||
look at http://wiki.openttd.org/index.php/Command_line.
|
||||
|
||||
The most frequent problem is missing data files. Please install OpenGFX and
|
||||
possibly OpenSFX and OpenMSX. See section 4.1.1 for more information.
|
||||
|
||||
Under, especially, Ubuntu OpenTTD can be extremely slow and freeze/hand under
|
||||
certain circumstance. See known-bugs.txt for more information and how to
|
||||
solve this problem on your computer.
|
||||
The most frequent problem is missing data files. Don't forget to put all GRF
|
||||
files from TTD into your data/ folder including sample.cat!
|
||||
|
||||
Under Windows 98 and lower it is impossible to use a dedicated server; it will
|
||||
fail to start. Perhaps this is for the better because those OSes are not known
|
||||
@@ -571,7 +560,7 @@ Retired Developers:
|
||||
|
||||
Thanks to:
|
||||
Josef Drexler - For his great work on TTDPatch.
|
||||
Marcin Grzegorczyk - For his TTDPatch work and documentation of Transport Tycoon Deluxe internals and graphics (signals and track foundations)
|
||||
Marcin Grzegorczyk - For his TTDPatch work and documentation of TTD internals and graphics (signals and track foundations)
|
||||
Petr Baudiš (pasky) - Many patches, newgrf support, etc.
|
||||
Simon Sasburg (HackyKid) - For the many bugfixes he has blessed us with
|
||||
Stefan Meißner (sign_de) - For his work on the console
|
||||
|
||||
+1
-2
@@ -186,8 +186,7 @@ bool SQVM::ObjCmp(const SQObjectPtr &o1,const SQObjectPtr &o2,SQInteger &result)
|
||||
case OT_STRING:
|
||||
_RET_SUCCEED(scstrcmp(_stringval(o1),_stringval(o2)));
|
||||
case OT_INTEGER:
|
||||
/* FS#3954: wrong integer comparison */
|
||||
_RET_SUCCEED((_integer(o1)<_integer(o2))?-1:(_integer(o1)==_integer(o2))?0:1);
|
||||
_RET_SUCCEED(_integer(o1)-_integer(o2));
|
||||
case OT_FLOAT:
|
||||
_RET_SUCCEED((_float(o1)<_float(o2))?-1:1);
|
||||
case OT_TABLE:
|
||||
|
||||
@@ -93,13 +93,13 @@ const AIConfigItemList *AIConfig::GetConfigList()
|
||||
return this->config_list;
|
||||
}
|
||||
|
||||
AIConfig *AIConfig::GetConfig(CompanyID company, AISettingSource source)
|
||||
AIConfig *AIConfig::GetConfig(CompanyID company, bool forceNewgameSetting)
|
||||
{
|
||||
AIConfig **config;
|
||||
if (source == AISS_FORCE_NEWGAME || (source == AISS_DEFAULT && _game_mode == GM_MENU)) {
|
||||
config = &_settings_newgame.ai_config[company];
|
||||
if (!forceNewgameSetting) {
|
||||
config = (_game_mode == GM_MENU) ? &_settings_newgame.ai_config[company] : &_settings_game.ai_config[company];
|
||||
} else {
|
||||
config = &_settings_game.ai_config[company];
|
||||
config = &_settings_newgame.ai_config[company];
|
||||
}
|
||||
if (*config == NULL) *config = new AIConfig();
|
||||
return *config;
|
||||
|
||||
@@ -61,18 +61,10 @@ public:
|
||||
*/
|
||||
const AIConfigItemList *GetConfigList();
|
||||
|
||||
/* Where to get the config from, either default (depends on current game
|
||||
* mode) or force either newgame or normal */
|
||||
enum AISettingSource {
|
||||
AISS_DEFAULT, ///< Get the AI config from the current game mode
|
||||
AISS_FORCE_NEWGAME, ///< Get the newgame AI config
|
||||
AISS_FORCE_GAME, ///< Get the AI config from the current game
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the config of a company.
|
||||
*/
|
||||
static AIConfig *GetConfig(CompanyID company, AISettingSource source = AISS_DEFAULT);
|
||||
static AIConfig *GetConfig(CompanyID company, bool forceNewgameSetting = false);
|
||||
|
||||
/**
|
||||
* Get the value of a setting for this config. It might fallback to his
|
||||
|
||||
@@ -1016,26 +1016,3 @@ void ShowAIDebugWindow(CompanyID show_company)
|
||||
ShowErrorMessage(STR_ERROR_AI_DEBUG_SERVER_ONLY, INVALID_STRING_ID, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the AI windows to their initial state.
|
||||
*/
|
||||
void InitializeAIGui()
|
||||
{
|
||||
AIDebugWindow::ai_debug_company = INVALID_COMPANY;
|
||||
}
|
||||
|
||||
/** Open the AI debug window if one of the AI scripts has crashed. */
|
||||
void ShowAIDebugWindowIfAIError()
|
||||
{
|
||||
/* Network clients can't debug AIs. */
|
||||
if (_networking && !_network_server) return;
|
||||
|
||||
Company *c;
|
||||
FOR_ALL_COMPANIES(c) {
|
||||
if (c->is_ai && c->ai_instance->IsDead()) {
|
||||
ShowAIDebugWindow(c->index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,7 @@
|
||||
#ifdef ENABLE_AI
|
||||
void ShowAIDebugWindow(CompanyID show_company = INVALID_COMPANY);
|
||||
void ShowAIConfigWindow();
|
||||
void ShowAIDebugWindowIfAIError();
|
||||
void InitializeAIGui();
|
||||
#else
|
||||
#include "../gui.h"
|
||||
#include "table/strings.h"
|
||||
|
||||
static inline void ShowAIConfigWindow()
|
||||
@@ -28,8 +25,6 @@ static inline void ShowAIConfigWindow()
|
||||
ShowErrorMessage(STR_ERROR_NO_AI, STR_ERROR_NO_AI_SUB, 0, 0);
|
||||
}
|
||||
static inline void ShowAIDebugWindow(CompanyID show_company = INVALID_COMPANY) {ShowAIConfigWindow();}
|
||||
static inline void ShowAIDebugWindowIfAIError() {}
|
||||
static inline void InitializeAIGui() {}
|
||||
#endif /* ENABLE_AI */
|
||||
|
||||
#endif /* AI_GUI_HPP */
|
||||
|
||||
@@ -784,10 +784,13 @@ SQInteger AIAbstractList::Valuate(HSQUIRRELVM vm)
|
||||
/* Push the function to call */
|
||||
sq_push(vm, 2);
|
||||
|
||||
for (AIAbstractListMap::iterator iter = this->items.begin(); iter != this->items.end(); iter++) {
|
||||
/* Check for changing of items. */
|
||||
int previous_modification_count = this->modifications;
|
||||
/* Walk all items, and query the result */
|
||||
this->buckets.clear();
|
||||
|
||||
/* Check for changing of items. */
|
||||
int begin_modification_count = this->modifications;
|
||||
|
||||
for (AIAbstractListMap::iterator iter = this->items.begin(); iter != this->items.end(); iter++) {
|
||||
/* Push the root table as instance object, this is what squirrel does for meta-functions. */
|
||||
sq_pushroottable(vm);
|
||||
/* Push all arguments for the valuator function. */
|
||||
@@ -825,7 +828,7 @@ SQInteger AIAbstractList::Valuate(HSQUIRRELVM vm)
|
||||
}
|
||||
|
||||
/* Was something changed? */
|
||||
if (previous_modification_count != this->modifications) {
|
||||
if (begin_modification_count != this->modifications) {
|
||||
/* See below for explanation. The extra pop is the return value. */
|
||||
sq_pop(vm, nparam + 4);
|
||||
|
||||
@@ -833,7 +836,8 @@ SQInteger AIAbstractList::Valuate(HSQUIRRELVM vm)
|
||||
return sq_throwerror(vm, _SC("modifying valuated list outside of valuator function"));
|
||||
}
|
||||
|
||||
this->SetValue((*iter).first, value);
|
||||
(*iter).second = (int32)value;
|
||||
this->buckets[(int32)value].insert((*iter).first);
|
||||
|
||||
/* Pop the return value. */
|
||||
sq_poptop(vm);
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
static int32 GetMaxSpeed(BridgeID bridge_id);
|
||||
|
||||
/**
|
||||
* Get the new cost of a bridge, excluding the road and/or rail.
|
||||
* Get the new cost of a bridge.
|
||||
* @param bridge_id The bridge to get the new cost of.
|
||||
* @param length The length of the bridge.
|
||||
* @pre IsValidBridge(bridge_id).
|
||||
|
||||
@@ -14,23 +14,10 @@
|
||||
* functions may still be available if you return an older API version
|
||||
* in GetAPIVersion() in info.nut.
|
||||
*
|
||||
* \b 1.0.3
|
||||
*
|
||||
* API additions:
|
||||
* \li AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING
|
||||
*
|
||||
* \b 1.0.2
|
||||
*
|
||||
* Other changes:
|
||||
* \li AIBridge::GetPrice now returns the price of the bridge without the cost for the rail or road.
|
||||
*
|
||||
* \b 1.0.1
|
||||
*
|
||||
* API additions:
|
||||
* \li AIRail::GetMaxSpeed
|
||||
*
|
||||
* \b 1.0.0
|
||||
*
|
||||
* 1.0.0 is not yet released. The following changes are not set in stone yet.
|
||||
*
|
||||
* API additions:
|
||||
* \li AIBaseStation
|
||||
* \li AIEngine::IsBuildable
|
||||
|
||||
@@ -16,21 +16,20 @@
|
||||
#include "../../strings_func.h"
|
||||
#include "../../rail.h"
|
||||
#include "../../engine_base.h"
|
||||
#include "../../engine_func.h"
|
||||
#include "../../articulated_vehicles.h"
|
||||
#include "table/strings.h"
|
||||
|
||||
/* static */ bool AIEngine::IsValidEngine(EngineID engine_id)
|
||||
{
|
||||
const Engine *e = ::Engine::GetIfValid(engine_id);
|
||||
return e != NULL && (::IsEngineBuildable(engine_id, e->type, _current_company) || ::Company::Get(_current_company)->num_engines[engine_id] > 0);
|
||||
return e != NULL && (HasBit(e->company_avail, _current_company) || ::Company::Get(_current_company)->num_engines[engine_id] > 0);
|
||||
|
||||
}
|
||||
|
||||
/* static */ bool AIEngine::IsBuildable(EngineID engine_id)
|
||||
{
|
||||
const Engine *e = ::Engine::GetIfValid(engine_id);
|
||||
return e != NULL && ::IsEngineBuildable(engine_id, e->type, _current_company);
|
||||
return e != NULL && HasBit(e->company_avail, _current_company);
|
||||
}
|
||||
|
||||
/* static */ char *AIEngine::GetName(EngineID engine_id)
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "../../command_type.h"
|
||||
#include "../../strings_func.h"
|
||||
#include "../../industry.h"
|
||||
#include "../../newgrf_industries.h"
|
||||
#include "../../core/random_func.hpp"
|
||||
|
||||
/* static */ bool AIIndustryType::IsValidIndustryType(IndustryType industry_type)
|
||||
@@ -89,8 +88,6 @@
|
||||
/* static */ bool AIIndustryType::CanBuildIndustry(IndustryType industry_type)
|
||||
{
|
||||
if (!IsValidIndustryType(industry_type)) return false;
|
||||
|
||||
if (!::CheckIfCallBackAllowsAvailability(industry_type, IACT_USERCREATION)) return false;
|
||||
if (!::GetIndustrySpec(industry_type)->IsRawIndustry()) return true;
|
||||
|
||||
/* raw_industry_construction == 1 means "Build as other industries" */
|
||||
@@ -100,9 +97,7 @@
|
||||
/* static */ bool AIIndustryType::CanProspectIndustry(IndustryType industry_type)
|
||||
{
|
||||
if (!IsValidIndustryType(industry_type)) return false;
|
||||
|
||||
if (!::GetIndustrySpec(industry_type)->IsRawIndustry()) return false;
|
||||
if (!::CheckIfCallBackAllowsAvailability(industry_type, IACT_USERCREATION)) return false;
|
||||
|
||||
/* raw_industry_construction == 2 means "prospect" */
|
||||
return _settings_game.construction.raw_industry_construction == 2;
|
||||
|
||||
@@ -469,10 +469,3 @@ static bool IsValidSignalType(int signal_type)
|
||||
default: return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ int32 AIRail::GetMaxSpeed(RailType railtype)
|
||||
{
|
||||
if (!AIRail::IsRailTypeAvailable(railtype)) return -1;
|
||||
|
||||
return ::GetRailTypeInfo((::RailType)railtype)->max_speed;
|
||||
}
|
||||
|
||||
@@ -38,9 +38,6 @@ public:
|
||||
|
||||
/** Non-uniform stations is diabled */
|
||||
ERR_NONUNIFORM_STATIONS_DISABLED, // [STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED]
|
||||
|
||||
/** This railtype cannot have crossings */
|
||||
ERR_RAILTYPE_DISALLOWS_CROSSING, // [STR_ERROR_CROSSING_DISALLOWED]
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -443,18 +440,6 @@ public:
|
||||
* @return The baseprice of building the given object.
|
||||
*/
|
||||
static Money GetBuildCost(RailType railtype, BuildType build_type);
|
||||
|
||||
/**
|
||||
* Get the maximum speed of trains running on this railtype.
|
||||
* @param railtype The railtype to get the maximum speed of.
|
||||
* @pre IsRailTypeAvailable(railtype)
|
||||
* @return The maximum speed trains can run on this railtype
|
||||
* or 0 if there is no limit.
|
||||
* @note The speed is in OpenTTD's internal speed unit.
|
||||
* This is mph / 1.6, which is roughly km/h.
|
||||
* To get km/h multiply this number by 1.00584.
|
||||
*/
|
||||
static int32 GetMaxSpeed(RailType railtype);
|
||||
};
|
||||
|
||||
#endif /* AI_RAIL_HPP */
|
||||
|
||||
@@ -42,7 +42,6 @@ void SQAIRail_Register(Squirrel *engine)
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, "ERR_NONUNIFORM_STATIONS_DISABLED");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTYPE_INVALID, "RAILTYPE_INVALID");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE");
|
||||
@@ -72,12 +71,10 @@ void SQAIRail_Register(Squirrel *engine)
|
||||
AIError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD);
|
||||
AIError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, AIRail::ERR_UNSUITABLE_TRACK);
|
||||
AIError::RegisterErrorMap(STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED, AIRail::ERR_NONUNIFORM_STATIONS_DISABLED);
|
||||
AIError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING);
|
||||
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, "ERR_NONUNIFORM_STATIONS_DISABLED");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
|
||||
SQAIRail.DefSQStaticMethod(engine, &AIRail::IsRailTile, "IsRailTile", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &AIRail::IsLevelCrossingTile, "IsLevelCrossingTile", 2, ".i");
|
||||
@@ -109,7 +106,6 @@ void SQAIRail_Register(Squirrel *engine)
|
||||
SQAIRail.DefSQStaticMethod(engine, &AIRail::BuildSignal, "BuildSignal", 4, ".iii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &AIRail::RemoveSignal, "RemoveSignal", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &AIRail::GetBuildCost, "GetBuildCost", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &AIRail::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
|
||||
SQAIRail.PostRegister(engine);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
{
|
||||
EnforcePrecondition(false, ::IsValidTile(tile));
|
||||
|
||||
return AIObject::DoCommand(tile, TREE_INVALID, tile, CMD_PLANT_TREE);
|
||||
return AIObject::DoCommand(tile, UINT_MAX, tile, CMD_PLANT_TREE);
|
||||
}
|
||||
|
||||
/* static */ bool AITile::PlantTreeRectangle(TileIndex tile, uint width, uint height)
|
||||
@@ -258,7 +258,7 @@
|
||||
EnforcePrecondition(false, height >= 1 && height <= 20);
|
||||
TileIndex end_tile = tile + ::TileDiffXY(width - 1, height - 1);
|
||||
|
||||
return AIObject::DoCommand(tile, TREE_INVALID, end_tile, CMD_PLANT_TREE);
|
||||
return AIObject::DoCommand(tile, UINT_MAX, end_tile, CMD_PLANT_TREE);
|
||||
}
|
||||
|
||||
/* static */ bool AITile::IsWithinTownInfluence(TileIndex tile, TownID town_id)
|
||||
|
||||
+2
-20
@@ -14,7 +14,6 @@
|
||||
#include "ai_cargo.hpp"
|
||||
#include "ai_error.hpp"
|
||||
#include "../../town.h"
|
||||
#include "../../town_type.h"
|
||||
#include "../../strings_func.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../../station_base.h"
|
||||
@@ -173,25 +172,8 @@
|
||||
if (company == AICompany::COMPANY_INVALID) return TOWN_RATING_INVALID;
|
||||
|
||||
const Town *t = ::Town::Get(town_id);
|
||||
if (!HasBit(t->have_ratings, company)) {
|
||||
return TOWN_RATING_NONE;
|
||||
} else if (t->ratings[company] <= RATING_APPALLING) {
|
||||
return TOWN_RATING_APPALLING;
|
||||
} else if (t->ratings[company] <= RATING_VERYPOOR) {
|
||||
return TOWN_RATING_VERY_POOR;
|
||||
} else if (t->ratings[company] <= RATING_POOR) {
|
||||
return TOWN_RATING_POOR;
|
||||
} else if (t->ratings[company] <= RATING_MEDIOCRE) {
|
||||
return TOWN_RATING_MEDIOCRE;
|
||||
} else if (t->ratings[company] <= RATING_GOOD) {
|
||||
return TOWN_RATING_GOOD;
|
||||
} else if (t->ratings[company] <= RATING_VERYGOOD) {
|
||||
return TOWN_RATING_VERY_GOOD;
|
||||
} else if (t->ratings[company] <= RATING_EXCELLENT) {
|
||||
return TOWN_RATING_EXCELLENT;
|
||||
} else {
|
||||
return TOWN_RATING_OUTSTANDING;
|
||||
}
|
||||
if (!HasBit(t->have_ratings, company)) return TOWN_RATING_NONE;
|
||||
return max(TOWN_RATING_APPALLING, (TownRating)((t->ratings[company] / 200) + 3));
|
||||
}
|
||||
|
||||
/* static */ int AITown::GetAllowedNoise(TownID town_id)
|
||||
|
||||
@@ -77,10 +77,10 @@ static void _DoCommandReturnBuildTunnel1(class AIInstance *instance)
|
||||
|
||||
uint type = 0;
|
||||
if (vehicle_type == AIVehicle::VT_ROAD) {
|
||||
type |= (TRANSPORT_ROAD << 8);
|
||||
type |= (TRANSPORT_ROAD << 9);
|
||||
type |= ::RoadTypeToRoadTypes((::RoadType)AIObject::GetRoadType());
|
||||
} else {
|
||||
type |= (TRANSPORT_RAIL << 8);
|
||||
type |= (TRANSPORT_RAIL << 9);
|
||||
type |= AIRail::GetCurrentRailType();
|
||||
}
|
||||
|
||||
|
||||
+8
-13
@@ -237,10 +237,9 @@ void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height)
|
||||
*/
|
||||
CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
EngineID eid = GB(p1, 0, 16);
|
||||
if (!IsEngineBuildable(eid, VEH_AIRCRAFT, _current_company)) return_cmd_error(STR_ERROR_AIRCRAFT_NOT_AVAILABLE);
|
||||
if (!IsEngineBuildable(p1, VEH_AIRCRAFT, _current_company)) return_cmd_error(STR_ERROR_AIRCRAFT_NOT_AVAILABLE);
|
||||
|
||||
const Engine *e = Engine::Get(eid);
|
||||
const Engine *e = Engine::Get(p1);
|
||||
const AircraftVehicleInfo *avi = &e->u.air;
|
||||
CommandCost value(EXPENSES_NEW_VEHICLES, e->GetCost());
|
||||
|
||||
@@ -253,7 +252,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
if (!IsHangarTile(tile) || !IsTileOwner(tile, _current_company)) return CMD_ERROR;
|
||||
|
||||
/* Prevent building aircraft types at places which can't handle them */
|
||||
if (!CanVehicleUseStation(eid, Station::GetByTile(tile))) return CMD_ERROR;
|
||||
if (!CanVehicleUseStation(p1, Station::GetByTile(tile))) return CMD_ERROR;
|
||||
|
||||
/* We will need to allocate 2 or 3 vehicle structs, depending on type */
|
||||
if (!Vehicle::CanAllocateItem(avi->subtype & AIR_CTOL ? 2 : 3)) {
|
||||
@@ -300,8 +299,8 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
|
||||
v->max_speed = avi->max_speed;
|
||||
v->acceleration = avi->acceleration;
|
||||
v->engine_type = eid;
|
||||
u->engine_type = eid;
|
||||
v->engine_type = p1;
|
||||
u->engine_type = p1;
|
||||
|
||||
v->subtype = (avi->subtype & AIR_CTOL ? AIR_AIRCRAFT : AIR_HELICOPTER);
|
||||
v->UpdateDeltaXY(INVALID_DIR);
|
||||
@@ -363,7 +362,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
/* Aircraft with 3 vehicles (chopper)? */
|
||||
if (v->subtype == AIR_HELICOPTER) {
|
||||
Aircraft *w = new Aircraft();
|
||||
w->engine_type = eid;
|
||||
w->engine_type = p1;
|
||||
w->direction = DIR_N;
|
||||
w->owner = _current_company;
|
||||
w->x_pos = v->x_pos;
|
||||
@@ -388,7 +387,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
if (IsLocalCompany())
|
||||
InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Aircraft window
|
||||
|
||||
Company::Get(_current_company)->num_engines[eid]++;
|
||||
Company::Get(_current_company)->num_engines[p1]++;
|
||||
}
|
||||
|
||||
return value;
|
||||
@@ -877,11 +876,7 @@ static bool AircraftController(Aircraft *v)
|
||||
/* Make sure the rotors don't rotate too fast */
|
||||
if (u->cur_speed > 32) {
|
||||
v->cur_speed = 0;
|
||||
if (--u->cur_speed == 32) {
|
||||
if (!PlayVehicleSound(v, VSE_START)) {
|
||||
SndPlayVehicleFx(SND_18_HELICOPTER, v);
|
||||
}
|
||||
}
|
||||
if (--u->cur_speed == 32) SndPlayVehicleFx(SND_18_HELICOPTER, v);
|
||||
} else {
|
||||
u->cur_speed = 32;
|
||||
count = UpdateAircraftSpeed(v);
|
||||
|
||||
@@ -108,11 +108,10 @@ struct BaseSet {
|
||||
* Read the set information from a loaded ini.
|
||||
* @param ini the ini to read from
|
||||
* @param path the path to this ini file (for filenames)
|
||||
* @param full_filename the full filename of the loaded file (for error reporting purposes)
|
||||
* @param allow_empty_filename empty filenames are valid
|
||||
* @return true if loading was successful.
|
||||
*/
|
||||
bool FillSetDetails(IniFile *ini, const char *path, const char *full_filename, bool allow_empty_filename = true);
|
||||
bool FillSetDetails(IniFile *ini, const char *path, bool allow_empty_filename = true);
|
||||
|
||||
/**
|
||||
* Get the description for the given ISO code.
|
||||
@@ -239,7 +238,7 @@ enum GraphicsFileType {
|
||||
struct GraphicsSet : BaseSet<GraphicsSet, MAX_GFT, DATA_DIR> {
|
||||
PaletteType palette; ///< Palette of this graphics set
|
||||
|
||||
bool FillSetDetails(struct IniFile *ini, const char *path, const char *full_filename);
|
||||
bool FillSetDetails(struct IniFile *ini, const char *path);
|
||||
};
|
||||
|
||||
/** All data/functions related with replacing the base graphics. */
|
||||
@@ -277,7 +276,7 @@ struct MusicSet : BaseSet<MusicSet, NUM_SONGS_AVAILABLE, GM_DIR> {
|
||||
byte track_nr[NUM_SONGS_AVAILABLE];
|
||||
byte num_available;
|
||||
|
||||
bool FillSetDetails(struct IniFile *ini, const char *path, const char *full_filename);
|
||||
bool FillSetDetails(struct IniFile *ini, const char *path);
|
||||
};
|
||||
|
||||
/** All data/functions related with replacing the base music */
|
||||
|
||||
@@ -25,13 +25,12 @@ template <class Tbase_set> /* static */ Tbase_set *BaseMedia<Tbase_set>::availab
|
||||
#define fetch_metadata(name) \
|
||||
item = metadata->GetItem(name, false); \
|
||||
if (item == NULL || StrEmpty(item->value)) { \
|
||||
DEBUG(grf, 0, "Base " SET_TYPE "set detail loading: %s field missing.", name); \
|
||||
DEBUG(grf, 0, " Is %s readable for the user running OpenTTD?", full_filename); \
|
||||
DEBUG(grf, 0, "Base " SET_TYPE "set detail loading: %s field missing", name); \
|
||||
return false; \
|
||||
}
|
||||
|
||||
template <class T, size_t Tnum_files, Subdirectory Tsubdir>
|
||||
bool BaseSet<T, Tnum_files, Tsubdir>::FillSetDetails(IniFile *ini, const char *path, const char *full_filename, bool allow_empty_filename)
|
||||
bool BaseSet<T, Tnum_files, Tsubdir>::FillSetDetails(IniFile *ini, const char *path, bool allow_empty_filename)
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
|
||||
@@ -71,7 +70,7 @@ bool BaseSet<T, Tnum_files, Tsubdir>::FillSetDetails(IniFile *ini, const char *p
|
||||
/* Find the filename first. */
|
||||
item = files->GetItem(BaseSet<T, Tnum_files, Tsubdir>::file_names[i], false);
|
||||
if (item == NULL || (item->value == NULL && !allow_empty_filename)) {
|
||||
DEBUG(grf, 0, "No " SET_TYPE " file for: %s (in %s)", BaseSet<T, Tnum_files, Tsubdir>::file_names[i], full_filename);
|
||||
DEBUG(grf, 0, "No " SET_TYPE " file for: %s", BaseSet<T, Tnum_files, Tsubdir>::file_names[i]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,7 +88,7 @@ bool BaseSet<T, Tnum_files, Tsubdir>::FillSetDetails(IniFile *ini, const char *p
|
||||
/* Then find the MD5 checksum */
|
||||
item = md5s->GetItem(filename, false);
|
||||
if (item == NULL) {
|
||||
DEBUG(grf, 0, "No MD5 checksum specified for: %s (in %s)", filename, full_filename);
|
||||
DEBUG(grf, 0, "No MD5 checksum specified for: %s", filename);
|
||||
return false;
|
||||
}
|
||||
char *c = item->value;
|
||||
@@ -102,7 +101,7 @@ bool BaseSet<T, Tnum_files, Tsubdir>::FillSetDetails(IniFile *ini, const char *p
|
||||
} else if ('A' <= *c && *c <= 'F') {
|
||||
j = *c - 'A' + 10;
|
||||
} else {
|
||||
DEBUG(grf, 0, "Malformed MD5 checksum specified for: %s (in %s)", filename, full_filename);
|
||||
DEBUG(grf, 0, "Malformed MD5 checksum specified for: %s", filename);
|
||||
return false;
|
||||
}
|
||||
if (i % 2 == 0) {
|
||||
@@ -156,7 +155,7 @@ bool BaseMedia<Tbase_set>::AddFile(const char *filename, size_t basepath_length)
|
||||
*path = '\0';
|
||||
}
|
||||
|
||||
if (set->FillSetDetails(ini, path, filename)) {
|
||||
if (set->FillSetDetails(ini, path)) {
|
||||
Tbase_set *duplicate = NULL;
|
||||
for (Tbase_set *c = BaseMedia<Tbase_set>::available_sets; c != NULL; c = c->next) {
|
||||
if (strcmp(c->name, set->name) == 0 || c->shortname == set->shortname) {
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ static inline const BridgeSpec *GetBridgeSpec(BridgeType i)
|
||||
|
||||
void DrawBridgeMiddle(const TileInfo *ti);
|
||||
|
||||
CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoCommandFlag flags = DC_NONE);
|
||||
bool CheckBridge_Stuff(BridgeType bridge_type, uint bridge_len, DoCommandFlag flags = DC_NONE);
|
||||
int CalcBridgeLenCostFactor(int x);
|
||||
|
||||
void ResetBridges();
|
||||
|
||||
+3
-11
@@ -14,7 +14,6 @@
|
||||
#include "command_func.h"
|
||||
#include "economy_func.h"
|
||||
#include "bridge.h"
|
||||
#include "rail.h"
|
||||
#include "strings_func.h"
|
||||
#include "window_func.h"
|
||||
#include "sound_func.h"
|
||||
@@ -376,7 +375,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
||||
case TRANSPORT_RAIL: last_bridge_type = _last_railbridge_type; break;
|
||||
default: break; // water ways and air routes don't have bridge types
|
||||
}
|
||||
if (_ctrl_pressed && CheckBridgeAvailability(last_bridge_type, bridge_len).Succeeded()) {
|
||||
if (_ctrl_pressed && CheckBridge_Stuff(last_bridge_type, bridge_len)) {
|
||||
DoCommandP(end, start, type | last_bridge_type, CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE), CcBuildBridge);
|
||||
return;
|
||||
}
|
||||
@@ -395,23 +394,16 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
||||
|
||||
bl = new GUIBridgeList();
|
||||
|
||||
Money infra_cost = 0;
|
||||
switch (transport_type) {
|
||||
case TRANSPORT_ROAD: infra_cost = (bridge_len + 2) * _price[PR_BUILD_ROAD] * 2; break;
|
||||
case TRANSPORT_RAIL: infra_cost = (bridge_len + 2) * RailBuildCost((RailType)road_rail_type); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
/* loop for all bridgetypes */
|
||||
for (BridgeType brd_type = 0; brd_type != MAX_BRIDGES; brd_type++) {
|
||||
if (CheckBridgeAvailability(brd_type, bridge_len).Succeeded()) {
|
||||
if (CheckBridge_Stuff(brd_type, bridge_len)) {
|
||||
/* bridge is accepted, add to list */
|
||||
BuildBridgeData *item = bl->Append();
|
||||
item->index = brd_type;
|
||||
item->spec = GetBridgeSpec(brd_type);
|
||||
/* Add to terraforming & bulldozing costs the cost of the
|
||||
* bridge itself (not computed with DC_QUERY_COST) */
|
||||
item->cost = ret.GetCost() + (((int64)tot_bridgedata_len * _price[PR_BUILD_BRIDGE] * item->spec->price) >> 8) + infra_cost;
|
||||
item->cost = ret.GetCost() + (((int64)tot_bridgedata_len * _price[PR_BUILD_BRIDGE] * item->spec->price) >> 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ enum BuildVehicleWidgets {
|
||||
static const NWidgetPart _nested_build_vehicle_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, BUILD_VEHICLE_WIDGET_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, BUILD_VEHICLE_WIDGET_CAPTION), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_SHADEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
EndContainer(),
|
||||
@@ -1017,7 +1017,7 @@ struct BuildVehicleWindow : Window {
|
||||
size_t num_items = this->eng_list.Length();
|
||||
this->sel_engine = (i < num_items) ? this->eng_list[i] : INVALID_ENGINE;
|
||||
this->SetDirty();
|
||||
if (click_count > 1 && !this->listview_mode) this->OnClick(pt, BUILD_VEHICLE_WIDGET_BUILD, 1);
|
||||
if (click_count > 1) this->OnClick(pt, BUILD_VEHICLE_WIDGET_BUILD, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1122,9 +1122,8 @@ struct BuildVehicleWindow : Window {
|
||||
}
|
||||
}
|
||||
if (needed_height != this->details_height) { // Details window are not high enough, enlarge them.
|
||||
int resize = needed_height - this->details_height;
|
||||
this->details_height = needed_height;
|
||||
this->ReInit(0, resize);
|
||||
this->ReInit();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-29
@@ -189,40 +189,19 @@ static void TileLoopClearAlps(TileIndex tile)
|
||||
MarkTileDirtyByTile(tile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if at least one surrounding tile is desert
|
||||
* @param tile tile to check
|
||||
* @return does this tile have at least one desert tile around?
|
||||
*/
|
||||
static inline bool NeighbourIsDesert(TileIndex tile)
|
||||
{
|
||||
return GetTropicZone(tile + TileDiffXY( 1, 0)) == TROPICZONE_DESERT ||
|
||||
GetTropicZone(tile + TileDiffXY( -1, 0)) == TROPICZONE_DESERT ||
|
||||
GetTropicZone(tile + TileDiffXY( 0, 1)) == TROPICZONE_DESERT ||
|
||||
GetTropicZone(tile + TileDiffXY( 0, -1)) == TROPICZONE_DESERT;
|
||||
}
|
||||
|
||||
static void TileLoopClearDesert(TileIndex tile)
|
||||
{
|
||||
/* Current desert level - 0 if it is not desert */
|
||||
uint current = 0;
|
||||
if (IsClearGround(tile, CLEAR_DESERT)) current = GetClearDensity(tile);
|
||||
if (IsClearGround(tile, CLEAR_DESERT)) return;
|
||||
|
||||
/* Expected desert level - 0 if it shouldn't be desert */
|
||||
uint expected = 0;
|
||||
if (GetTropicZone(tile) == TROPICZONE_DESERT) {
|
||||
expected = 3;
|
||||
} else if (NeighbourIsDesert(tile)) {
|
||||
expected = 1;
|
||||
}
|
||||
|
||||
if (current == expected) return;
|
||||
|
||||
if (expected == 0) {
|
||||
SetClearGroundDensity(tile, CLEAR_GRASS, 3);
|
||||
SetClearGroundDensity(tile, CLEAR_DESERT, 3);
|
||||
} else {
|
||||
/* Transition from clear to desert is not smooth (after clearing desert tile) */
|
||||
SetClearGroundDensity(tile, CLEAR_DESERT, expected);
|
||||
if (GetTropicZone(tile + TileDiffXY( 1, 0)) != TROPICZONE_DESERT &&
|
||||
GetTropicZone(tile + TileDiffXY(-1, 0)) != TROPICZONE_DESERT &&
|
||||
GetTropicZone(tile + TileDiffXY( 0, 1)) != TROPICZONE_DESERT &&
|
||||
GetTropicZone(tile + TileDiffXY( 0, -1)) != TROPICZONE_DESERT)
|
||||
return;
|
||||
SetClearGroundDensity(tile, CLEAR_DESERT, 1);
|
||||
}
|
||||
|
||||
MarkTileDirtyByTile(tile);
|
||||
|
||||
+16
-7
@@ -12,16 +12,25 @@
|
||||
#ifndef CMD_HELPER_H
|
||||
#define CMD_HELPER_H
|
||||
|
||||
#include "core/enum_type.hpp"
|
||||
#include "direction_type.h"
|
||||
#include "road_type.h"
|
||||
|
||||
template<typename T, uint S, uint N, typename U> static inline T Extract(U v)
|
||||
|
||||
template<uint N> static inline void ExtractValid();
|
||||
template<> inline void ExtractValid<1>() {}
|
||||
|
||||
|
||||
template<typename T> struct ExtractBits;
|
||||
template<> struct ExtractBits<Axis> { static const uint Count = 1; };
|
||||
template<> struct ExtractBits<DiagDirection> { static const uint Count = 2; };
|
||||
template<> struct ExtractBits<RoadBits> { static const uint Count = 4; };
|
||||
|
||||
|
||||
template<typename T, uint N, typename U> static inline T Extract(U v)
|
||||
{
|
||||
/* Check if there are enough bits in v */
|
||||
assert_tcompile(N == EnumPropsT<T>::num_bits);
|
||||
assert_tcompile(S + N <= sizeof(U) * 8);
|
||||
assert_tcompile(EnumPropsT<T>::end <= (1 << N));
|
||||
U masked = GB(v, S, N);
|
||||
return IsInsideMM(masked, EnumPropsT<T>::begin, EnumPropsT<T>::end) ? (T)masked : EnumPropsT<T>::invalid;
|
||||
ExtractValid<N + ExtractBits<T>::Count <= sizeof(U) * 8>();
|
||||
return (T)GB(v, N, ExtractBits<T>::Count);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+110
-129
@@ -188,8 +188,6 @@ CommandProc CmdSetVehicleOnTime;
|
||||
CommandProc CmdAutofillTimetable;
|
||||
CommandProc CmdSetTimetableStart;
|
||||
|
||||
#define DEF_CMD(proc, flags) {proc, #proc, flags}
|
||||
|
||||
/**
|
||||
* The master command table
|
||||
*
|
||||
@@ -198,141 +196,141 @@ CommandProc CmdSetTimetableStart;
|
||||
* as the value from the CMD_* enums.
|
||||
*/
|
||||
static const Command _command_proc_table[] = {
|
||||
DEF_CMD(CmdBuildRailroadTrack, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_RAILROAD_TRACK
|
||||
DEF_CMD(CmdRemoveRailroadTrack, CMD_AUTO), // CMD_REMOVE_RAILROAD_TRACK
|
||||
DEF_CMD(CmdBuildSingleRail, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_SINGLE_RAIL
|
||||
DEF_CMD(CmdRemoveSingleRail, CMD_AUTO), // CMD_REMOVE_SINGLE_RAIL
|
||||
DEF_CMD(CmdLandscapeClear, 0), // CMD_LANDSCAPE_CLEAR
|
||||
DEF_CMD(CmdBuildBridge, CMD_AUTO), // CMD_BUILD_BRIDGE
|
||||
DEF_CMD(CmdBuildRailStation, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_RAIL_STATION
|
||||
DEF_CMD(CmdBuildTrainDepot, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_TRAIN_DEPOT
|
||||
DEF_CMD(CmdBuildSingleSignal, CMD_AUTO), // CMD_BUILD_SIGNALS
|
||||
DEF_CMD(CmdRemoveSingleSignal, CMD_AUTO), // CMD_REMOVE_SIGNALS
|
||||
DEF_CMD(CmdTerraformLand, CMD_ALL_TILES | CMD_AUTO), // CMD_TERRAFORM_LAND
|
||||
DEF_CMD(CmdPurchaseLandArea, CMD_NO_WATER | CMD_AUTO), // CMD_PURCHASE_LAND_AREA
|
||||
DEF_CMD(CmdSellLandArea, 0), // CMD_SELL_LAND_AREA
|
||||
DEF_CMD(CmdBuildTunnel, CMD_AUTO), // CMD_BUILD_TUNNEL
|
||||
DEF_CMD(CmdRemoveFromRailStation, 0), // CMD_REMOVE_FROM_RAIL_STATION
|
||||
DEF_CMD(CmdConvertRail, 0), // CMD_CONVERT_RAILD
|
||||
DEF_CMD(CmdBuildRailWaypoint, 0), // CMD_BUILD_RAIL_WAYPOINT
|
||||
DEF_CMD(CmdRenameWaypoint, 0), // CMD_RENAME_WAYPOINT
|
||||
DEF_CMD(CmdRemoveFromRailWaypoint, 0), // CMD_REMOVE_FROM_RAIL_WAYPOINT
|
||||
{CmdBuildRailroadTrack, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_RAILROAD_TRACK
|
||||
{CmdRemoveRailroadTrack, CMD_AUTO}, // CMD_REMOVE_RAILROAD_TRACK
|
||||
{CmdBuildSingleRail, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_SINGLE_RAIL
|
||||
{CmdRemoveSingleRail, CMD_AUTO}, // CMD_REMOVE_SINGLE_RAIL
|
||||
{CmdLandscapeClear, 0}, // CMD_LANDSCAPE_CLEAR
|
||||
{CmdBuildBridge, CMD_AUTO}, // CMD_BUILD_BRIDGE
|
||||
{CmdBuildRailStation, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_RAIL_STATION
|
||||
{CmdBuildTrainDepot, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_TRAIN_DEPOT
|
||||
{CmdBuildSingleSignal, CMD_AUTO}, // CMD_BUILD_SIGNALS
|
||||
{CmdRemoveSingleSignal, CMD_AUTO}, // CMD_REMOVE_SIGNALS
|
||||
{CmdTerraformLand, CMD_ALL_TILES | CMD_AUTO}, // CMD_TERRAFORM_LAND
|
||||
{CmdPurchaseLandArea, CMD_NO_WATER | CMD_AUTO}, // CMD_PURCHASE_LAND_AREA
|
||||
{CmdSellLandArea, 0}, // CMD_SELL_LAND_AREA
|
||||
{CmdBuildTunnel, CMD_AUTO}, // CMD_BUILD_TUNNEL
|
||||
{CmdRemoveFromRailStation, 0}, // CMD_REMOVE_FROM_RAIL_STATION
|
||||
{CmdConvertRail, 0}, // CMD_CONVERT_RAILD
|
||||
{CmdBuildRailWaypoint, 0}, // CMD_BUILD_RAIL_WAYPOINT
|
||||
{CmdRenameWaypoint, 0}, // CMD_RENAME_WAYPOINT
|
||||
{CmdRemoveFromRailWaypoint, 0}, // CMD_REMOVE_FROM_RAIL_WAYPOINT
|
||||
|
||||
DEF_CMD(CmdBuildRoadStop, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_ROAD_STOP
|
||||
DEF_CMD(CmdRemoveRoadStop, 0), // CMD_REMOVE_ROAD_STOP
|
||||
DEF_CMD(CmdBuildLongRoad, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_LONG_ROAD
|
||||
DEF_CMD(CmdRemoveLongRoad, CMD_NO_TEST | CMD_AUTO), // CMD_REMOVE_LONG_ROAD; towns may disallow removing road bits (as they are connected) in test, but in exec they're removed and thus removing is allowed.
|
||||
DEF_CMD(CmdBuildRoad, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_ROAD
|
||||
DEF_CMD(CmdBuildRoadDepot, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_ROAD_DEPOT
|
||||
{CmdBuildRoadStop, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_ROAD_STOP
|
||||
{CmdRemoveRoadStop, 0}, // CMD_REMOVE_ROAD_STOP
|
||||
{CmdBuildLongRoad, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_LONG_ROAD
|
||||
{CmdRemoveLongRoad, CMD_NO_TEST | CMD_AUTO}, // CMD_REMOVE_LONG_ROAD; towns may disallow removing road bits (as they are connected) in test, but in exec they're removed and thus removing is allowed.
|
||||
{CmdBuildRoad, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_ROAD
|
||||
{CmdBuildRoadDepot, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_ROAD_DEPOT
|
||||
|
||||
DEF_CMD(CmdBuildAirport, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_AIRPORT
|
||||
DEF_CMD(CmdBuildDock, CMD_AUTO), // CMD_BUILD_DOCK
|
||||
DEF_CMD(CmdBuildShipDepot, CMD_AUTO), // CMD_BUILD_SHIP_DEPOT
|
||||
DEF_CMD(CmdBuildBuoy, CMD_AUTO), // CMD_BUILD_BUOY
|
||||
DEF_CMD(CmdPlantTree, CMD_AUTO), // CMD_PLANT_TREE
|
||||
DEF_CMD(CmdBuildRailVehicle, 0), // CMD_BUILD_RAIL_VEHICLE
|
||||
DEF_CMD(CmdMoveRailVehicle, 0), // CMD_MOVE_RAIL_VEHICLE
|
||||
{CmdBuildAirport, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_AIRPORT
|
||||
{CmdBuildDock, CMD_AUTO}, // CMD_BUILD_DOCK
|
||||
{CmdBuildShipDepot, CMD_AUTO}, // CMD_BUILD_SHIP_DEPOT
|
||||
{CmdBuildBuoy, CMD_AUTO}, // CMD_BUILD_BUOY
|
||||
{CmdPlantTree, CMD_AUTO}, // CMD_PLANT_TREE
|
||||
{CmdBuildRailVehicle, 0}, // CMD_BUILD_RAIL_VEHICLE
|
||||
{CmdMoveRailVehicle, 0}, // CMD_MOVE_RAIL_VEHICLE
|
||||
|
||||
DEF_CMD(CmdSellRailWagon, 0), // CMD_SELL_RAIL_WAGON
|
||||
DEF_CMD(CmdSendTrainToDepot, 0), // CMD_SEND_TRAIN_TO_DEPOT
|
||||
DEF_CMD(CmdForceTrainProceed, 0), // CMD_FORCE_TRAIN_PROCEED
|
||||
DEF_CMD(CmdReverseTrainDirection, 0), // CMD_REVERSE_TRAIN_DIRECTION
|
||||
{CmdSellRailWagon, 0}, // CMD_SELL_RAIL_WAGON
|
||||
{CmdSendTrainToDepot, 0}, // CMD_SEND_TRAIN_TO_DEPOT
|
||||
{CmdForceTrainProceed, 0}, // CMD_FORCE_TRAIN_PROCEED
|
||||
{CmdReverseTrainDirection, 0}, // CMD_REVERSE_TRAIN_DIRECTION
|
||||
|
||||
DEF_CMD(CmdModifyOrder, 0), // CMD_MODIFY_ORDER
|
||||
DEF_CMD(CmdSkipToOrder, 0), // CMD_SKIP_TO_ORDER
|
||||
DEF_CMD(CmdDeleteOrder, 0), // CMD_DELETE_ORDER
|
||||
DEF_CMD(CmdInsertOrder, 0), // CMD_INSERT_ORDER
|
||||
{CmdModifyOrder, 0}, // CMD_MODIFY_ORDER
|
||||
{CmdSkipToOrder, 0}, // CMD_SKIP_TO_ORDER
|
||||
{CmdDeleteOrder, 0}, // CMD_DELETE_ORDER
|
||||
{CmdInsertOrder, 0}, // CMD_INSERT_ORDER
|
||||
|
||||
DEF_CMD(CmdChangeServiceInt, 0), // CMD_CHANGE_SERVICE_INT
|
||||
{CmdChangeServiceInt, 0}, // CMD_CHANGE_SERVICE_INT
|
||||
|
||||
DEF_CMD(CmdBuildIndustry, 0), // CMD_BUILD_INDUSTRY
|
||||
DEF_CMD(CmdBuildCompanyHQ, CMD_NO_WATER | CMD_AUTO), // CMD_BUILD_COMPANY_HQ
|
||||
DEF_CMD(CmdSetCompanyManagerFace, 0), // CMD_SET_COMPANY_MANAGER_FACE
|
||||
DEF_CMD(CmdSetCompanyColour, 0), // CMD_SET_COMPANY_COLOUR
|
||||
{CmdBuildIndustry, 0}, // CMD_BUILD_INDUSTRY
|
||||
{CmdBuildCompanyHQ, CMD_NO_WATER | CMD_AUTO}, // CMD_BUILD_COMPANY_HQ
|
||||
{CmdSetCompanyManagerFace, 0}, // CMD_SET_COMPANY_MANAGER_FACE
|
||||
{CmdSetCompanyColour, 0}, // CMD_SET_COMPANY_COLOUR
|
||||
|
||||
DEF_CMD(CmdIncreaseLoan, 0), // CMD_INCREASE_LOAN
|
||||
DEF_CMD(CmdDecreaseLoan, 0), // CMD_DECREASE_LOAN
|
||||
{CmdIncreaseLoan, 0}, // CMD_INCREASE_LOAN
|
||||
{CmdDecreaseLoan, 0}, // CMD_DECREASE_LOAN
|
||||
|
||||
DEF_CMD(CmdWantEnginePreview, 0), // CMD_WANT_ENGINE_PREVIEW
|
||||
{CmdWantEnginePreview, 0}, // CMD_WANT_ENGINE_PREVIEW
|
||||
|
||||
DEF_CMD(CmdRenameVehicle, 0), // CMD_RENAME_VEHICLE
|
||||
DEF_CMD(CmdRenameEngine, 0), // CMD_RENAME_ENGINE
|
||||
{CmdRenameVehicle, 0}, // CMD_RENAME_VEHICLE
|
||||
{CmdRenameEngine, 0}, // CMD_RENAME_ENGINE
|
||||
|
||||
DEF_CMD(CmdRenameCompany, 0), // CMD_RENAME_COMPANY
|
||||
DEF_CMD(CmdRenamePresident, 0), // CMD_RENAME_PRESIDENT
|
||||
{CmdRenameCompany, 0}, // CMD_RENAME_COMPANY
|
||||
{CmdRenamePresident, 0}, // CMD_RENAME_PRESIDENT
|
||||
|
||||
DEF_CMD(CmdRenameStation, 0), // CMD_RENAME_STATION
|
||||
{CmdRenameStation, 0}, // CMD_RENAME_STATION
|
||||
|
||||
DEF_CMD(CmdSellAircraft, 0), // CMD_SELL_AIRCRAFT
|
||||
{CmdSellAircraft, 0}, // CMD_SELL_AIRCRAFT
|
||||
|
||||
DEF_CMD(CmdBuildAircraft, 0), // CMD_BUILD_AIRCRAFT
|
||||
DEF_CMD(CmdSendAircraftToHangar, 0), // CMD_SEND_AIRCRAFT_TO_HANGAR
|
||||
DEF_CMD(CmdRefitAircraft, 0), // CMD_REFIT_AIRCRAFT
|
||||
{CmdBuildAircraft, 0}, // CMD_BUILD_AIRCRAFT
|
||||
{CmdSendAircraftToHangar, 0}, // CMD_SEND_AIRCRAFT_TO_HANGAR
|
||||
{CmdRefitAircraft, 0}, // CMD_REFIT_AIRCRAFT
|
||||
|
||||
DEF_CMD(CmdPlaceSign, 0), // CMD_PLACE_SIGN
|
||||
DEF_CMD(CmdRenameSign, 0), // CMD_RENAME_SIGN
|
||||
{CmdPlaceSign, 0}, // CMD_PLACE_SIGN
|
||||
{CmdRenameSign, 0}, // CMD_RENAME_SIGN
|
||||
|
||||
DEF_CMD(CmdBuildRoadVeh, 0), // CMD_BUILD_ROAD_VEH
|
||||
DEF_CMD(CmdSellRoadVeh, 0), // CMD_SELL_ROAD_VEH
|
||||
DEF_CMD(CmdSendRoadVehToDepot, 0), // CMD_SEND_ROADVEH_TO_DEPOT
|
||||
DEF_CMD(CmdTurnRoadVeh, 0), // CMD_TURN_ROADVEH
|
||||
DEF_CMD(CmdRefitRoadVeh, 0), // CMD_REFIT_ROAD_VEH
|
||||
{CmdBuildRoadVeh, 0}, // CMD_BUILD_ROAD_VEH
|
||||
{CmdSellRoadVeh, 0}, // CMD_SELL_ROAD_VEH
|
||||
{CmdSendRoadVehToDepot, 0}, // CMD_SEND_ROADVEH_TO_DEPOT
|
||||
{CmdTurnRoadVeh, 0}, // CMD_TURN_ROADVEH
|
||||
{CmdRefitRoadVeh, 0}, // CMD_REFIT_ROAD_VEH
|
||||
|
||||
DEF_CMD(CmdPause, CMD_SERVER), // CMD_PAUSE
|
||||
{CmdPause, CMD_SERVER}, // CMD_PAUSE
|
||||
|
||||
DEF_CMD(CmdBuyShareInCompany, 0), // CMD_BUY_SHARE_IN_COMPANY
|
||||
DEF_CMD(CmdSellShareInCompany, 0), // CMD_SELL_SHARE_IN_COMPANY
|
||||
DEF_CMD(CmdBuyCompany, 0), // CMD_BUY_COMANY
|
||||
{CmdBuyShareInCompany, 0}, // CMD_BUY_SHARE_IN_COMPANY
|
||||
{CmdSellShareInCompany, 0}, // CMD_SELL_SHARE_IN_COMPANY
|
||||
{CmdBuyCompany, 0}, // CMD_BUY_COMANY
|
||||
|
||||
DEF_CMD(CmdFoundTown, CMD_NO_TEST), // CMD_FOUND_TOWN; founding random town can fail only in exec run
|
||||
DEF_CMD(CmdRenameTown, CMD_SERVER), // CMD_RENAME_TOWN
|
||||
DEF_CMD(CmdDoTownAction, 0), // CMD_DO_TOWN_ACTION
|
||||
{CmdFoundTown, CMD_NO_TEST}, // CMD_FOUND_TOWN; founding random town can fail only in exec run
|
||||
{CmdRenameTown, CMD_SERVER}, // CMD_RENAME_TOWN
|
||||
{CmdDoTownAction, 0}, // CMD_DO_TOWN_ACTION
|
||||
|
||||
DEF_CMD(CmdSellShip, 0), // CMD_SELL_SHIP
|
||||
DEF_CMD(CmdBuildShip, 0), // CMD_BUILD_SHIP
|
||||
DEF_CMD(CmdSendShipToDepot, 0), // CMD_SEND_SHIP_TO_DEPOT
|
||||
DEF_CMD(CmdRefitShip, 0), // CMD_REFIT_SHIP
|
||||
{CmdSellShip, 0}, // CMD_SELL_SHIP
|
||||
{CmdBuildShip, 0}, // CMD_BUILD_SHIP
|
||||
{CmdSendShipToDepot, 0}, // CMD_SEND_SHIP_TO_DEPOT
|
||||
{CmdRefitShip, 0}, // CMD_REFIT_SHIP
|
||||
|
||||
DEF_CMD(CmdOrderRefit, 0), // CMD_ORDER_REFIT
|
||||
DEF_CMD(CmdCloneOrder, 0), // CMD_CLONE_ORDER
|
||||
{CmdOrderRefit, 0}, // CMD_ORDER_REFIT
|
||||
{CmdCloneOrder, 0}, // CMD_CLONE_ORDER
|
||||
|
||||
DEF_CMD(CmdClearArea, CMD_NO_TEST), // CMD_CLEAR_AREA; destroying multi-tile houses makes town rating differ between test and execution
|
||||
{CmdClearArea, CMD_NO_TEST}, // CMD_CLEAR_AREA; destroying multi-tile houses makes town rating differ between test and execution
|
||||
|
||||
DEF_CMD(CmdMoneyCheat, CMD_OFFLINE), // CMD_MONEY_CHEAT
|
||||
DEF_CMD(CmdBuildCanal, CMD_AUTO), // CMD_BUILD_CANAL
|
||||
DEF_CMD(CmdCompanyCtrl, CMD_SPECTATOR), // CMD_COMPANY_CTRL
|
||||
{CmdMoneyCheat, CMD_OFFLINE}, // CMD_MONEY_CHEAT
|
||||
{CmdBuildCanal, CMD_AUTO}, // CMD_BUILD_CANAL
|
||||
{CmdCompanyCtrl, CMD_SPECTATOR}, // CMD_COMPANY_CTRL
|
||||
|
||||
DEF_CMD(CmdLevelLand, CMD_ALL_TILES | CMD_NO_TEST | CMD_AUTO), // CMD_LEVEL_LAND; test run might clear tiles multiple times, in execution that only happens once
|
||||
{CmdLevelLand, CMD_ALL_TILES | CMD_NO_TEST | CMD_AUTO}, // CMD_LEVEL_LAND; test run might clear tiles multiple times, in execution that only happens once
|
||||
|
||||
DEF_CMD(CmdRefitRailVehicle, 0), // CMD_REFIT_RAIL_VEHICLE
|
||||
DEF_CMD(CmdRestoreOrderIndex, 0), // CMD_RESTORE_ORDER_INDEX
|
||||
DEF_CMD(CmdBuildLock, CMD_AUTO), // CMD_BUILD_LOCK
|
||||
{CmdRefitRailVehicle, 0}, // CMD_REFIT_RAIL_VEHICLE
|
||||
{CmdRestoreOrderIndex, 0}, // CMD_RESTORE_ORDER_INDEX
|
||||
{CmdBuildLock, CMD_AUTO}, // CMD_BUILD_LOCK
|
||||
|
||||
DEF_CMD(CmdBuildSignalTrack, CMD_AUTO), // CMD_BUILD_SIGNAL_TRACK
|
||||
DEF_CMD(CmdRemoveSignalTrack, CMD_AUTO), // CMD_REMOVE_SIGNAL_TRACK
|
||||
{CmdBuildSignalTrack, CMD_AUTO}, // CMD_BUILD_SIGNAL_TRACK
|
||||
{CmdRemoveSignalTrack, CMD_AUTO}, // CMD_REMOVE_SIGNAL_TRACK
|
||||
|
||||
DEF_CMD(CmdGiveMoney, 0), // CMD_GIVE_MONEY
|
||||
DEF_CMD(CmdChangeSetting, CMD_SERVER), // CMD_CHANGE_SETTING
|
||||
DEF_CMD(CmdChangeCompanySetting, 0), // CMD_CHANGE_COMPANY_SETTING
|
||||
DEF_CMD(CmdSetAutoReplace, 0), // CMD_SET_AUTOREPLACE
|
||||
DEF_CMD(CmdCloneVehicle, CMD_NO_TEST), // CMD_CLONE_VEHICLE; NewGRF callbacks influence building and refitting making it impossible to correctly estimate the cost
|
||||
DEF_CMD(CmdStartStopVehicle, 0), // CMD_START_STOP_VEHICLE
|
||||
DEF_CMD(CmdMassStartStopVehicle, 0), // CMD_MASS_START_STOP
|
||||
DEF_CMD(CmdAutoreplaceVehicle, 0), // CMD_AUTOREPLACE_VEHICLE
|
||||
DEF_CMD(CmdDepotSellAllVehicles, 0), // CMD_DEPOT_SELL_ALL_VEHICLES
|
||||
DEF_CMD(CmdDepotMassAutoReplace, 0), // CMD_DEPOT_MASS_AUTOREPLACE
|
||||
DEF_CMD(CmdCreateGroup, 0), // CMD_CREATE_GROUP
|
||||
DEF_CMD(CmdDeleteGroup, 0), // CMD_DELETE_GROUP
|
||||
DEF_CMD(CmdRenameGroup, 0), // CMD_RENAME_GROUP
|
||||
DEF_CMD(CmdAddVehicleGroup, 0), // CMD_ADD_VEHICLE_GROUP
|
||||
DEF_CMD(CmdAddSharedVehicleGroup, 0), // CMD_ADD_SHARE_VEHICLE_GROUP
|
||||
DEF_CMD(CmdRemoveAllVehiclesGroup, 0), // CMD_REMOVE_ALL_VEHICLES_GROUP
|
||||
DEF_CMD(CmdSetGroupReplaceProtection, 0), // CMD_SET_GROUP_REPLACE_PROTECTION
|
||||
DEF_CMD(CmdMoveOrder, 0), // CMD_MOVE_ORDER
|
||||
DEF_CMD(CmdChangeTimetable, 0), // CMD_CHANGE_TIMETABLE
|
||||
DEF_CMD(CmdSetVehicleOnTime, 0), // CMD_SET_VEHICLE_ON_TIME
|
||||
DEF_CMD(CmdAutofillTimetable, 0), // CMD_AUTOFILL_TIMETABLE
|
||||
DEF_CMD(CmdSetTimetableStart, 0), // CMD_SET_TIMETABLE_START
|
||||
{CmdGiveMoney, 0}, // CMD_GIVE_MONEY
|
||||
{CmdChangeSetting, CMD_SERVER}, // CMD_CHANGE_SETTING
|
||||
{CmdChangeCompanySetting, 0}, // CMD_CHANGE_COMPANY_SETTING
|
||||
{CmdSetAutoReplace, 0}, // CMD_SET_AUTOREPLACE
|
||||
{CmdCloneVehicle, CMD_NO_TEST}, // CMD_CLONE_VEHICLE; NewGRF callbacks influence building and refitting making it impossible to correctly estimate the cost
|
||||
{CmdStartStopVehicle, 0}, // CMD_START_STOP_VEHICLE
|
||||
{CmdMassStartStopVehicle, 0}, // CMD_MASS_START_STOP
|
||||
{CmdAutoreplaceVehicle, 0}, // CMD_AUTOREPLACE_VEHICLE
|
||||
{CmdDepotSellAllVehicles, 0}, // CMD_DEPOT_SELL_ALL_VEHICLES
|
||||
{CmdDepotMassAutoReplace, 0}, // CMD_DEPOT_MASS_AUTOREPLACE
|
||||
{CmdCreateGroup, 0}, // CMD_CREATE_GROUP
|
||||
{CmdDeleteGroup, 0}, // CMD_DELETE_GROUP
|
||||
{CmdRenameGroup, 0}, // CMD_RENAME_GROUP
|
||||
{CmdAddVehicleGroup, 0}, // CMD_ADD_VEHICLE_GROUP
|
||||
{CmdAddSharedVehicleGroup, 0}, // CMD_ADD_SHARE_VEHICLE_GROUP
|
||||
{CmdRemoveAllVehiclesGroup, 0}, // CMD_REMOVE_ALL_VEHICLES_GROUP
|
||||
{CmdSetGroupReplaceProtection, 0}, // CMD_SET_GROUP_REPLACE_PROTECTION
|
||||
{CmdMoveOrder, 0}, // CMD_MOVE_ORDER
|
||||
{CmdChangeTimetable, 0}, // CMD_CHANGE_TIMETABLE
|
||||
{CmdSetVehicleOnTime, 0}, // CMD_SET_VEHICLE_ON_TIME
|
||||
{CmdAutofillTimetable, 0}, // CMD_AUTOFILL_TIMETABLE
|
||||
{CmdSetTimetableStart, 0}, // CMD_SET_TIMETABLE_START
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -364,20 +362,6 @@ byte GetCommandFlags(uint32 cmd)
|
||||
return _command_proc_table[cmd & CMD_ID_MASK].flags;
|
||||
}
|
||||
|
||||
/*!
|
||||
* This function mask the parameter with CMD_ID_MASK and returns
|
||||
* the name which belongs to the given command.
|
||||
*
|
||||
* @param cmd The integer value of the command
|
||||
* @return The name for this command
|
||||
*/
|
||||
const char *GetCommandName(uint32 cmd)
|
||||
{
|
||||
assert(IsValidCommand(cmd));
|
||||
|
||||
return _command_proc_table[cmd & CMD_ID_MASK].name;
|
||||
}
|
||||
|
||||
static int _docommand_recursive = 0;
|
||||
|
||||
/**
|
||||
@@ -656,7 +640,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
return_dcpi(CommandCost(), false);
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
DEBUG(desync, 1, "cmd: %08x; %02x; %02x; %06x; %08x; %08x; %08x; \"%s\" (%s)", _date, _date_fract, (int)_current_company, tile, p1, p2, cmd & ~CMD_NETWORK_COMMAND, text, GetCommandName(cmd));
|
||||
DEBUG(desync, 1, "cmd: %08x; %08x; %1x; %06x; %08x; %08x; %04x; %s\n", _date, _date_fract, (int)_current_company, tile, p1, p2, cmd & ~CMD_NETWORK_COMMAND, text);
|
||||
|
||||
/* Actually try and execute the command. If no cost-type is given
|
||||
* use the construction one */
|
||||
@@ -678,9 +662,6 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
/* If we're needing more money and we haven't done
|
||||
* anything yet, ask for the money! */
|
||||
if (_additional_cash_required != 0 && res2.GetCost() == 0) {
|
||||
/* It could happen we removed rail, thus gained money, and deleted something else.
|
||||
* So make sure the signal buffer is empty even in this case */
|
||||
UpdateSignalsInBuffer();
|
||||
SetDParam(0, _additional_cash_required);
|
||||
return_dcpi(CommandCost(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY), false);
|
||||
}
|
||||
|
||||
@@ -67,10 +67,6 @@ bool IsValidCommand(uint32 cmd);
|
||||
* Returns the flags from a given command.
|
||||
*/
|
||||
byte GetCommandFlags(uint32 cmd);
|
||||
/**
|
||||
* Returns the name of a given command.
|
||||
*/
|
||||
const char *GetCommandName(uint32 cmd);
|
||||
/**
|
||||
* Returns the current money available which can be used for a command.
|
||||
*/
|
||||
|
||||
+2
-3
@@ -382,9 +382,8 @@ typedef CommandCost CommandProc(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
* the #CMD_AUTO, #CMD_OFFLINE and #CMD_SERVER values.
|
||||
*/
|
||||
struct Command {
|
||||
CommandProc *proc; ///< The procedure to actually executing
|
||||
const char *name; ///< A human readable name for the procedure
|
||||
byte flags; ///< The (command) flags to that apply to this command
|
||||
CommandProc *proc;
|
||||
byte flags;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+12
-16
@@ -15,7 +15,6 @@
|
||||
#include "company_gui.h"
|
||||
#include "town.h"
|
||||
#include "news_func.h"
|
||||
#include "cmd_helper.h"
|
||||
#include "command_func.h"
|
||||
#include "network/network.h"
|
||||
#include "network/network_func.h"
|
||||
@@ -79,8 +78,6 @@ void Company::PostDestructor(size_t index)
|
||||
InvalidateWindowData(WC_GRAPH_LEGEND, 0, (int)index);
|
||||
InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, (int)index);
|
||||
InvalidateWindowData(WC_COMPANY_LEAGUE, 0, 0);
|
||||
/* If the currently shown error message has this company in it, the close it. */
|
||||
InvalidateWindowData(WC_ERRMSG, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -592,11 +589,14 @@ static void HandleBankruptcyTakeover(Company *c)
|
||||
|
||||
SetBit(c->bankrupt_asked, best->index);
|
||||
|
||||
c->bankrupt_timeout = TAKE_OVER_TIMEOUT;
|
||||
if (IsInteractiveCompany(best->index)) {
|
||||
c->bankrupt_timeout = TAKE_OVER_TIMEOUT;
|
||||
ShowBuyCompanyDialog(c->index);
|
||||
return;
|
||||
}
|
||||
|
||||
if (best->is_ai) {
|
||||
AI::NewEvent(best->index, new AIEventCompanyAskMerger(c->index, ClampToI32(c->bankrupt_value)));
|
||||
} else if (IsInteractiveCompany(best->index)) {
|
||||
ShowBuyCompanyDialog(c->index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -895,11 +895,14 @@ CommandCost CmdSetCompanyManagerFace(TileIndex tile, DoCommandFlag flags, uint32
|
||||
*/
|
||||
CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
Colours colour = Extract<Colours, 0, 4>(p2);
|
||||
LiveryScheme scheme = Extract<LiveryScheme, 0, 8>(p1);
|
||||
if (p2 >= 16) return CMD_ERROR; // max 16 colours
|
||||
|
||||
Colours colour = (Colours)p2;
|
||||
|
||||
LiveryScheme scheme = (LiveryScheme)GB(p1, 0, 8);
|
||||
byte state = GB(p1, 8, 2);
|
||||
|
||||
if (scheme >= LS_END || state >= 3 || colour == INVALID_COLOUR) return CMD_ERROR;
|
||||
if (scheme >= LS_END || state >= 3) return CMD_ERROR;
|
||||
|
||||
Company *c = Company::Get(_current_company);
|
||||
|
||||
@@ -960,13 +963,6 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
ResetVehicleColourMap();
|
||||
MarkWholeScreenDirty();
|
||||
|
||||
/* All graph related to companies use the company colour. */
|
||||
InvalidateWindowData(WC_INCOME_GRAPH, 0);
|
||||
InvalidateWindowData(WC_OPERATING_PROFIT, 0);
|
||||
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
|
||||
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
|
||||
InvalidateWindowData(WC_COMPANY_VALUE, 0);
|
||||
|
||||
/* Company colour data is indirectly cached. */
|
||||
Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
|
||||
+1
-1
@@ -1984,7 +1984,7 @@ struct CompanyWindow : Window
|
||||
MarkWholeScreenDirty();
|
||||
} else if (NetworkCompanyIsPassworded(company)) {
|
||||
/* ask for the password */
|
||||
ShowQueryString(STR_EMPTY, STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION, NETWORK_PASSWORD_LENGTH, 180, this, CS_ALPHANUMERAL, QSF_NONE);
|
||||
ShowQueryString(STR_EMPTY, STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION, 20, 180, this, CS_ALPHANUMERAL, QSF_NONE);
|
||||
} else {
|
||||
/* just send the join command */
|
||||
NetworkClientRequestMove(company);
|
||||
|
||||
@@ -437,10 +437,6 @@ void IConsoleCmdExec(const char *cmdstr)
|
||||
break;
|
||||
case '"': // Tokens enclosed in "" are one token
|
||||
longtoken = !longtoken;
|
||||
if (!foundtoken) {
|
||||
tokens[t_index++] = &tokenstream[tstream_i];
|
||||
foundtoken = true;
|
||||
}
|
||||
break;
|
||||
case '\\': // Escape character for ""
|
||||
if (cmdptr[1] == '"' && tstream_i + 1 < lengthof(tokenstream)) {
|
||||
|
||||
+80
-66
@@ -252,18 +252,7 @@ static const FiosItem *GetFiosItem(const char *file)
|
||||
int i = strtol(file, &endptr, 10);
|
||||
if (file == endptr || *endptr != '\0') i = -1;
|
||||
|
||||
if (IsInsideMM(i, 0, _fios_items.Length())) return _fios_items.Get(i);
|
||||
|
||||
/* As a last effort assume it is an OpenTTD savegame and
|
||||
* that the ".sav" part was not given. */
|
||||
char long_file[MAX_PATH];
|
||||
seprintf(long_file, lastof(long_file), "%s.sav", file);
|
||||
for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
|
||||
if (strcmp(long_file, item->name) == 0) return item;
|
||||
if (strcmp(long_file, item->title) == 0) return item;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return IsInsideMM(i, 0, _fios_items.Length()) ? _fios_items.Get(i) : NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -402,59 +391,12 @@ DEF_CONSOLE_CMD(ConClearBuffer)
|
||||
**********************************/
|
||||
#ifdef ENABLE_NETWORK
|
||||
|
||||
static bool ConKickOrBan(const char *argv, bool ban)
|
||||
{
|
||||
const char *ip = argv;
|
||||
|
||||
if (strchr(argv, '.') == NULL && strchr(argv, ':') == NULL) { // banning with ID
|
||||
ClientID client_id = (ClientID)atoi(argv);
|
||||
|
||||
if (client_id == CLIENT_ID_SERVER) {
|
||||
IConsolePrintF(CC_ERROR, "ERROR: Silly boy, you can not %s yourself!", ban ? "ban" : "kick");
|
||||
return true;
|
||||
}
|
||||
|
||||
NetworkClientInfo *ci = NetworkFindClientInfoFromClientID(client_id);
|
||||
if (ci == NULL) {
|
||||
IConsoleError("Invalid client");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!ban) {
|
||||
/* Kick only this client, not all clients with that IP */
|
||||
NetworkServerKickClient(client_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* When banning, kick+ban all clients with that IP */
|
||||
ip = GetClientIP(ci);
|
||||
}
|
||||
|
||||
uint n = NetworkServerKickOrBanIP(ip, ban);
|
||||
if (n == 0) {
|
||||
IConsolePrint(CC_DEFAULT, ban ? "Client not online, address added to banlist" : "Client not found");
|
||||
} else {
|
||||
IConsolePrintF(CC_DEFAULT, "%sed %u client(s)", ban ? "Bann" : "Kick", n);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConKick)
|
||||
{
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Kick a client from a network game. Usage: 'kick <ip | client-id>'");
|
||||
IConsoleHelp("For client-id's, see the command 'clients'");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argc != 2) return false;
|
||||
|
||||
return ConKickOrBan(argv[1], false);
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConBan)
|
||||
{
|
||||
NetworkClientInfo *ci;
|
||||
const char *banip = NULL;
|
||||
ClientID client_id;
|
||||
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Ban a client from a network game. Usage: 'ban <ip | client-id>'");
|
||||
IConsoleHelp("For client-id's, see the command 'clients'");
|
||||
@@ -464,7 +406,39 @@ DEF_CONSOLE_CMD(ConBan)
|
||||
|
||||
if (argc != 2) return false;
|
||||
|
||||
return ConKickOrBan(argv[1], true);
|
||||
if (strchr(argv[1], '.') == NULL && strchr(argv[1], ':') == NULL) { // banning with ID
|
||||
client_id = (ClientID)atoi(argv[1]);
|
||||
ci = NetworkFindClientInfoFromClientID(client_id);
|
||||
} else { // banning IP
|
||||
ci = NetworkFindClientInfoFromIP(argv[1]);
|
||||
if (ci == NULL) {
|
||||
banip = argv[1];
|
||||
client_id = (ClientID)-1;
|
||||
} else {
|
||||
client_id = ci->client_id;
|
||||
}
|
||||
}
|
||||
|
||||
if (client_id == CLIENT_ID_SERVER) {
|
||||
IConsoleError("Silly boy, you can not ban yourself!");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (client_id == INVALID_CLIENT_ID || (ci == NULL && client_id != (ClientID)-1)) {
|
||||
IConsoleError("Invalid client");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ci != NULL) {
|
||||
IConsolePrint(CC_DEFAULT, "Client banned");
|
||||
banip = GetClientIP(ci);
|
||||
} else {
|
||||
IConsolePrint(CC_DEFAULT, "Client not online, banned IP");
|
||||
}
|
||||
|
||||
NetworkServerBanIP(banip);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConUnBan)
|
||||
@@ -621,6 +595,46 @@ DEF_CONSOLE_CMD(ConClientNickChange)
|
||||
return true;
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConKick)
|
||||
{
|
||||
NetworkClientInfo *ci;
|
||||
ClientID client_id;
|
||||
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Kick a client from a network game. Usage: 'kick <ip | client-id>'");
|
||||
IConsoleHelp("For client-id's, see the command 'clients'");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argc != 2) return false;
|
||||
|
||||
if (strchr(argv[1], '.') == NULL) {
|
||||
client_id = (ClientID)atoi(argv[1]);
|
||||
ci = NetworkFindClientInfoFromClientID(client_id);
|
||||
} else {
|
||||
ci = NetworkFindClientInfoFromIP(argv[1]);
|
||||
client_id = (ci == NULL) ? INVALID_CLIENT_ID : ci->client_id;
|
||||
}
|
||||
|
||||
if (client_id == CLIENT_ID_SERVER) {
|
||||
IConsoleError("Silly boy, you can not kick yourself!");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (client_id == INVALID_CLIENT_ID) {
|
||||
IConsoleError("Invalid client");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ci != NULL) {
|
||||
NetworkServerKickClient(client_id);
|
||||
} else {
|
||||
IConsoleError("Client not found");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConJoinCompany)
|
||||
{
|
||||
if (argc < 2) {
|
||||
@@ -800,7 +814,7 @@ DEF_CONSOLE_CMD(ConNetworkConnect)
|
||||
{
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Connect to a remote OTTD server and join the game. Usage: 'connect <ip>'");
|
||||
IConsoleHelp("IP can contain port and company: 'IP[:Port][#Company]', eg: 'server.ottd.org:443#2'");
|
||||
IConsoleHelp("IP can contain port and company: 'IP[[#Company]:Port]', eg: 'server.ottd.org#2:443'");
|
||||
IConsoleHelp("Company #255 is spectator all others are a certain company with Company 1 being #1");
|
||||
return true;
|
||||
}
|
||||
@@ -975,7 +989,7 @@ DEF_CONSOLE_CMD(ConRestart)
|
||||
/* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */
|
||||
_settings_game.game_creation.map_x = MapLogX();
|
||||
_settings_game.game_creation.map_y = FindFirstBit(MapSizeY());
|
||||
_switch_mode = SM_RESTARTGAME;
|
||||
SwitchToMode(SM_RESTARTGAME);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,16 +58,14 @@ template <typename Tenum_t> struct EnumPropsT;
|
||||
* @param Tbegin first valid value from the contiguous range (i.e. TRACK_BEGIN)
|
||||
* @param Tend one past the last valid value from the contiguous range (i.e. TRACK_END)
|
||||
* @param Tinvalid value used as invalid value marker (i.e. INVALID_TRACK)
|
||||
* @param Tnum_bits Number of bits for storing the enum in command parameters
|
||||
*/
|
||||
template <typename Tenum_t, typename Tstorage_t, Tenum_t Tbegin, Tenum_t Tend, Tenum_t Tinvalid, uint Tnum_bits = 8 * sizeof(Tstorage_t)>
|
||||
template <typename Tenum_t, typename Tstorage_t, Tenum_t Tbegin, Tenum_t Tend, Tenum_t Tinvalid>
|
||||
struct MakeEnumPropsT {
|
||||
typedef Tenum_t type; ///< enum type (i.e. Trackdir)
|
||||
typedef Tstorage_t storage; ///< storage type (i.e. byte)
|
||||
static const Tenum_t begin = Tbegin; ///< lowest valid value (i.e. TRACKDIR_BEGIN)
|
||||
static const Tenum_t end = Tend; ///< one after the last valid value (i.e. TRACKDIR_END)
|
||||
static const Tenum_t invalid = Tinvalid; ///< what value is used as invalid value (i.e. INVALID_TRACKDIR)
|
||||
static const uint num_bits = Tnum_bits; ///< Number of bits for storing the enum in command parameters
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ uint32 Randomizer::Next()
|
||||
return this->state[1] = ROR(s, 3) - 1;
|
||||
}
|
||||
|
||||
uint32 Randomizer::Next(uint32 max)
|
||||
uint32 Randomizer::Next(uint16 max)
|
||||
{
|
||||
return ((uint64)this->Next() * (uint64)max) >> 32;
|
||||
return GB(this->Next(), 0, 16) * max >> 16;
|
||||
}
|
||||
|
||||
void Randomizer::SetSeed(uint32 seed)
|
||||
@@ -55,8 +55,8 @@ uint32 DoRandom(int line, const char *file)
|
||||
return _random.Next();
|
||||
}
|
||||
|
||||
uint32 DoRandomRange(uint32 max, int line, const char *file)
|
||||
uint DoRandomRange(uint max, int line, const char *file)
|
||||
{
|
||||
return ((uint64)DoRandom(line, file) * (uint64)max) >> 32;
|
||||
return GB(DoRandom(line, file), 0, 16) * max >> 16;
|
||||
}
|
||||
#endif /* RANDOM_DEBUG */
|
||||
|
||||
@@ -48,7 +48,7 @@ struct Randomizer {
|
||||
* @param max the maximum value of the returned random number
|
||||
* @return the random number
|
||||
*/
|
||||
uint32 Next(uint32 max);
|
||||
uint32 Next(uint16 max);
|
||||
|
||||
/**
|
||||
* (Re)set the state of the random number generator.
|
||||
@@ -92,14 +92,14 @@ void SetRandomSeed(uint32 seed);
|
||||
#endif
|
||||
uint32 DoRandom(int line, const char *file);
|
||||
#define RandomRange(max) DoRandomRange(max, __LINE__, __FILE__)
|
||||
uint32 DoRandomRange(uint32 max, int line, const char *file);
|
||||
uint DoRandomRange(uint max, int line, const char *file);
|
||||
#else
|
||||
static FORCEINLINE uint32 Random()
|
||||
{
|
||||
return _random.Next();
|
||||
}
|
||||
|
||||
static FORCEINLINE uint32 RandomRange(uint32 max)
|
||||
static FORCEINLINE uint32 RandomRange(uint16 max)
|
||||
{
|
||||
return _random.Next(max);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ static FORCEINLINE uint32 InteractiveRandom()
|
||||
return _interactive_random.Next();
|
||||
}
|
||||
|
||||
static FORCEINLINE uint32 InteractiveRandomRange(uint32 max)
|
||||
static FORCEINLINE uint32 InteractiveRandomRange(uint16 max)
|
||||
{
|
||||
return _interactive_random.Next(max);
|
||||
}
|
||||
|
||||
+3
-6
@@ -109,25 +109,22 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
|
||||
buffer += seprintf(buffer, last,
|
||||
"Configuration:\n"
|
||||
" Blitter: %s\n"
|
||||
" Graphics set: %s (%d)\n"
|
||||
" Graphics set: %s\n"
|
||||
" Language: %s\n"
|
||||
" Music driver: %s\n"
|
||||
" Music set: %s (%d)\n"
|
||||
" Music set: %s\n"
|
||||
" Network: %s\n"
|
||||
" Sound driver: %s\n"
|
||||
" Sound set: %s (%d)\n"
|
||||
" Sound set: %s\n"
|
||||
" Video driver: %s\n\n",
|
||||
BlitterFactoryBase::GetCurrentBlitter() == NULL ? "none" : BlitterFactoryBase::GetCurrentBlitter()->GetName(),
|
||||
BaseGraphics::GetUsedSet() == NULL ? "none" : BaseGraphics::GetUsedSet()->name,
|
||||
BaseGraphics::GetUsedSet() == NULL ? -1 : BaseGraphics::GetUsedSet()->version,
|
||||
StrEmpty(_dynlang.curr_file) ? "none" : _dynlang.curr_file,
|
||||
_music_driver == NULL ? "none" : _music_driver->GetName(),
|
||||
BaseMusic::GetUsedSet() == NULL ? "none" : BaseMusic::GetUsedSet()->name,
|
||||
BaseMusic::GetUsedSet() == NULL ? -1 : BaseMusic::GetUsedSet()->version,
|
||||
_networking ? (_network_server ? "server" : "client") : "no",
|
||||
_sound_driver == NULL ? "none" : _sound_driver->GetName(),
|
||||
BaseSounds::GetUsedSet() == NULL ? "none" : BaseSounds::GetUsedSet()->name,
|
||||
BaseSounds::GetUsedSet() == NULL ? -1 : BaseSounds::GetUsedSet()->version,
|
||||
_video_driver == NULL ? "none" : _video_driver->GetName()
|
||||
);
|
||||
|
||||
|
||||
+33
-34
@@ -14,44 +14,43 @@
|
||||
#include "news_func.h"
|
||||
#include "settings_type.h"
|
||||
#include "date_func.h"
|
||||
#include "string_type.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
/* exchange rate prefix symbol_pos
|
||||
* | separator | postfix |
|
||||
* | | Euro year | | | name
|
||||
* | | | | | | | */
|
||||
/* exchange rate prefix symbol_pos
|
||||
* | separator | postfix |
|
||||
* | | Euro year | | | name
|
||||
* | | | | | | | */
|
||||
static const CurrencySpec origin_currency_specs[NUM_CURRENCY] = {
|
||||
{ 1, "", CF_NOEURO, "\xC2\xA3", "", 0, STR_GAME_OPTIONS_CURRENCY_GBP }, ///< british pounds
|
||||
{ 2, "", CF_NOEURO, "$", "", 0, STR_GAME_OPTIONS_CURRENCY_USD }, ///< us dollars
|
||||
{ 2, "", CF_ISEURO, "\xE2\x82\xAC", "", 0, STR_GAME_OPTIONS_CURRENCY_EUR }, ///< Euro
|
||||
{ 220, "", CF_NOEURO, "\xC2\xA5", "", 0, STR_GAME_OPTIONS_CURRENCY_YEN }, ///< yen
|
||||
{ 20, "", 2002, "", NBSP"S.", 1, STR_GAME_OPTIONS_CURRENCY_ATS }, ///< austrian schilling
|
||||
{ 59, "", 2002, "BEF"NBSP, "", 0, STR_GAME_OPTIONS_CURRENCY_BEF }, ///< belgian franc
|
||||
{ 2, "", CF_NOEURO, "CHF"NBSP, "", 0, STR_GAME_OPTIONS_CURRENCY_CHF }, ///< swiss franc
|
||||
{ 41, "", CF_NOEURO, "", NBSP"K\xC4\x8D", 1, STR_GAME_OPTIONS_CURRENCY_CZK }, ///< czech koruna
|
||||
{ 3, "", 2002, "DM"NBSP, "", 0, STR_GAME_OPTIONS_CURRENCY_DEM }, ///< deutsche mark
|
||||
{ 11, "", CF_NOEURO, "", NBSP"kr", 1, STR_GAME_OPTIONS_CURRENCY_DKK }, ///< danish krone
|
||||
{ 245, "", 2002, "Pts"NBSP, "", 0, STR_GAME_OPTIONS_CURRENCY_ESP }, ///< spanish pesetas
|
||||
{ 9, "", 2002, "", NBSP"mk", 1, STR_GAME_OPTIONS_CURRENCY_FIM }, ///< finnish markka
|
||||
{ 10, "", 2002, "FF"NBSP, "", 0, STR_GAME_OPTIONS_CURRENCY_FRF }, ///< french francs
|
||||
{ 500, "", 2002, "", "Dr.", 1, STR_GAME_OPTIONS_CURRENCY_GRD }, ///< greek drachma
|
||||
{ 378, "", CF_NOEURO, "", NBSP"Ft", 1, STR_GAME_OPTIONS_CURRENCY_HUF }, ///< hungarian forint
|
||||
{ 130, "", CF_NOEURO, "", NBSP"Kr", 1, STR_GAME_OPTIONS_CURRENCY_ISK }, ///< icelandic krona
|
||||
{ 2850, "", 2002, "", NBSP"L.", 1, STR_GAME_OPTIONS_CURRENCY_ITL }, ///< italian lira
|
||||
{ 3, "", 2002, "NLG"NBSP, "", 0, STR_GAME_OPTIONS_CURRENCY_NLG }, ///< dutch gulden
|
||||
{ 12, "", CF_NOEURO, "", NBSP"Kr", 1, STR_GAME_OPTIONS_CURRENCY_NOK }, ///< norwegian krone
|
||||
{ 6, "", CF_NOEURO, "", NBSP"z\xC5\x82", 1, STR_GAME_OPTIONS_CURRENCY_PLN }, ///< polish zloty
|
||||
{ 5, "", CF_NOEURO, "", NBSP"Lei", 1, STR_GAME_OPTIONS_CURRENCY_RON }, ///< romanian Lei
|
||||
{ 50, "", CF_NOEURO, "", NBSP"p", 1, STR_GAME_OPTIONS_CURRENCY_RUR }, ///< russian rouble
|
||||
{ 352, "", 2007, "", NBSP"SIT", 1, STR_GAME_OPTIONS_CURRENCY_SIT }, ///< slovenian tolar
|
||||
{ 13, "", CF_NOEURO, "", NBSP"Kr", 1, STR_GAME_OPTIONS_CURRENCY_SEK }, ///< swedish krona
|
||||
{ 3, "", CF_NOEURO, "", NBSP"TL", 1, STR_GAME_OPTIONS_CURRENCY_TRY }, ///< turkish lira
|
||||
{ 52, "", 2009, "", NBSP"Sk", 1, STR_GAME_OPTIONS_CURRENCY_SKK }, ///< slovak koruna
|
||||
{ 4, "", CF_NOEURO, "R$"NBSP, "", 0, STR_GAME_OPTIONS_CURRENCY_BRL }, ///< brazil real
|
||||
{ 20, "", CF_NOEURO, "", NBSP"EEK", 1, STR_GAME_OPTIONS_CURRENCY_EEK }, ///< estonian krooni
|
||||
{ 1, "", CF_NOEURO, "", "", 2, STR_GAME_OPTIONS_CURRENCY_CUSTOM }, ///< custom currency
|
||||
{ 1, "", CF_NOEURO, "\xC2\xA3", "", 0, STR_GAME_OPTIONS_CURRENCY_GBP }, ///< british pounds
|
||||
{ 2, "", CF_NOEURO, "$", "", 0, STR_GAME_OPTIONS_CURRENCY_USD }, ///< us dollars
|
||||
{ 2, "", CF_ISEURO, "\xE2\x82\xAC", "", 0, STR_GAME_OPTIONS_CURRENCY_EUR }, ///< Euro
|
||||
{ 220, "", CF_NOEURO, "\xC2\xA5", "", 0, STR_GAME_OPTIONS_CURRENCY_YEN }, ///< yen
|
||||
{ 20, "", 2002, "", " S.", 1, STR_GAME_OPTIONS_CURRENCY_ATS }, ///< austrian schilling
|
||||
{ 59, "", 2002, "BEF ", "", 0, STR_GAME_OPTIONS_CURRENCY_BEF }, ///< belgian franc
|
||||
{ 2, "", CF_NOEURO, "CHF ", "", 0, STR_GAME_OPTIONS_CURRENCY_CHF }, ///< swiss franc
|
||||
{ 41, "", CF_NOEURO, "", " K\xC4\x8D", 1, STR_GAME_OPTIONS_CURRENCY_CZK }, ///< czech koruna
|
||||
{ 3, "", 2002, "DM ", "", 0, STR_GAME_OPTIONS_CURRENCY_DEM }, ///< deutsche mark
|
||||
{ 11, "", CF_NOEURO, "", " kr", 1, STR_GAME_OPTIONS_CURRENCY_DKK }, ///< danish krone
|
||||
{ 245, "", 2002, "Pts ", "", 0, STR_GAME_OPTIONS_CURRENCY_ESP }, ///< spanish pesetas
|
||||
{ 9, "", 2002, "", " mk", 1, STR_GAME_OPTIONS_CURRENCY_FIM }, ///< finnish markka
|
||||
{ 10, "", 2002, "FF ", "", 0, STR_GAME_OPTIONS_CURRENCY_FRF }, ///< french francs
|
||||
{ 500, "", 2002, "", "Dr.", 1, STR_GAME_OPTIONS_CURRENCY_GRD }, ///< greek drachma
|
||||
{ 378, "", CF_NOEURO, "", " Ft", 1, STR_GAME_OPTIONS_CURRENCY_HUF }, ///< hungarian forint
|
||||
{ 130, "", CF_NOEURO, "", " Kr", 1, STR_GAME_OPTIONS_CURRENCY_ISK }, ///< icelandic krona
|
||||
{ 2850, "", 2002, "", " L.", 1, STR_GAME_OPTIONS_CURRENCY_ITL }, ///< italian lira
|
||||
{ 3, "", 2002, "NLG ", "", 0, STR_GAME_OPTIONS_CURRENCY_NLG }, ///< dutch gulden
|
||||
{ 12, "", CF_NOEURO, "", " Kr", 1, STR_GAME_OPTIONS_CURRENCY_NOK }, ///< norwegian krone
|
||||
{ 6, "", CF_NOEURO, "", " z\xC5\x82", 1, STR_GAME_OPTIONS_CURRENCY_PLN }, ///< polish zloty
|
||||
{ 5, "", CF_NOEURO, "", " Lei", 1, STR_GAME_OPTIONS_CURRENCY_RON }, ///< romanian Lei
|
||||
{ 50, "", CF_NOEURO, "", " p", 1, STR_GAME_OPTIONS_CURRENCY_RUR }, ///< russian rouble
|
||||
{ 352, "", 2007, "", " SIT", 1, STR_GAME_OPTIONS_CURRENCY_SIT }, ///< slovenian tolar
|
||||
{ 13, "", CF_NOEURO, "", " Kr", 1, STR_GAME_OPTIONS_CURRENCY_SEK }, ///< swedish krona
|
||||
{ 3, "", CF_NOEURO, "", " TL", 1, STR_GAME_OPTIONS_CURRENCY_TRY }, ///< turkish lira
|
||||
{ 52, "", 2009, "", " Sk", 1, STR_GAME_OPTIONS_CURRENCY_SKK }, ///< slovak koruna
|
||||
{ 4, "", CF_NOEURO, "R$ ", "", 0, STR_GAME_OPTIONS_CURRENCY_BRL }, ///< brazil real
|
||||
{ 20, "", CF_NOEURO, "", " EEK", 1, STR_GAME_OPTIONS_CURRENCY_EEK }, ///< estonian krooni
|
||||
{ 1, "", CF_NOEURO, "", "", 2, STR_GAME_OPTIONS_CURRENCY_CUSTOM }, ///< custom currency
|
||||
};
|
||||
|
||||
/* Array of currencies used by the system */
|
||||
|
||||
@@ -218,6 +218,12 @@ static void OnNewYear()
|
||||
*/
|
||||
static void OnNewMonth()
|
||||
{
|
||||
if (_debug_desync_level > 2) {
|
||||
char name[MAX_PATH];
|
||||
snprintf(name, lengthof(name), "dmp_cmds_%08x_%08x.sav", _settings_game.game_creation.generation_seed, _date);
|
||||
SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR);
|
||||
}
|
||||
|
||||
if (_settings_client.gui.autosave != 0 && (_cur_month % _autosave_months[_settings_client.gui.autosave]) == 0) {
|
||||
_do_autosave = true;
|
||||
RedrawAutosave();
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ static void debug_print(const char *dbg, const char *buf)
|
||||
static FILE *f = FioFOpenFile("commands-out.log", "wb", AUTOSAVE_DIR);
|
||||
if (f == NULL) return;
|
||||
|
||||
fprintf(f, "%s%s\n", GetLogPrefix(), buf);
|
||||
fprintf(f, "%s%s", GetLogPrefix(), buf);
|
||||
fflush(f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ enum Direction {
|
||||
DECLARE_POSTFIX_INCREMENT(Direction);
|
||||
|
||||
/** Define basic enum properties */
|
||||
template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR, 3> {};
|
||||
template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR> {};
|
||||
typedef TinyEnumT<Direction> DirectionByte; // typedefing-enumification of Direction
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ enum DiagDirection {
|
||||
DECLARE_POSTFIX_INCREMENT(DiagDirection);
|
||||
|
||||
/** Define basic enum properties */
|
||||
template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR, 2> {};
|
||||
template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR> {};
|
||||
typedef TinyEnumT<DiagDirection> DiagDirectionByte; // typedefing-enumification of DiagDirection
|
||||
|
||||
|
||||
@@ -130,6 +130,5 @@ enum Axis {
|
||||
AXIS_END, ///< Used for iterations
|
||||
INVALID_AXIS = 0xFF, ///< Flag for an invalid Axis
|
||||
};
|
||||
template <> struct EnumPropsT<Axis> : MakeEnumPropsT<Axis, byte, AXIS_X, AXIS_END, INVALID_AXIS, 1> {};
|
||||
|
||||
#endif /* DIRECTION_TYPE_H */
|
||||
|
||||
+28
-16
@@ -297,11 +297,6 @@ int UpdateCompanyRatingAndValue(Company *c, bool update)
|
||||
/* use INVALID_OWNER as new_owner to delete the company. */
|
||||
void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
|
||||
{
|
||||
#ifdef ENABLE_NETWORK
|
||||
/* In all cases, make spectators of clients connected to that company */
|
||||
if (_networking) NetworkClientsToSpectators(old_owner);
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
Town *t;
|
||||
CompanyID old = _current_company;
|
||||
|
||||
@@ -476,6 +471,21 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
|
||||
MarkWholeScreenDirty();
|
||||
}
|
||||
|
||||
static void ChangeNetworkOwner(Owner current_owner, Owner new_owner)
|
||||
{
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (!_networking) return;
|
||||
|
||||
if (current_owner == _local_company) {
|
||||
SetLocalCompany(new_owner);
|
||||
}
|
||||
|
||||
if (!_network_server) return;
|
||||
|
||||
NetworkServerChangeOwner(current_owner, new_owner);
|
||||
#endif /* ENABLE_NETWORK */
|
||||
}
|
||||
|
||||
static void CompanyCheckBankrupt(Company *c)
|
||||
{
|
||||
/* If the company has money again, it does not go bankrupt */
|
||||
@@ -537,6 +547,8 @@ static void CompanyCheckBankrupt(Company *c)
|
||||
SetDParamStr(2, cni->company_name);
|
||||
AddCompanyNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_BANKRUPT, cni);
|
||||
|
||||
/* Remove the company */
|
||||
ChangeNetworkOwner(c->index, COMPANY_SPECTATOR);
|
||||
ChangeOwnershipOfCompanyItems(c->index, INVALID_OWNER);
|
||||
|
||||
if (c->is_ai) AI::Stop(c->index);
|
||||
@@ -1447,6 +1459,8 @@ static void DoAcquireCompany(Company *c)
|
||||
AddCompanyNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_MERGER, cni);
|
||||
AI::BroadcastNewEvent(new AIEventCompanyMerger(ci, _current_company));
|
||||
|
||||
/* original code does this a little bit differently */
|
||||
ChangeNetworkOwner(ci, _current_company);
|
||||
ChangeOwnershipOfCompanyItems(ci, _current_company);
|
||||
|
||||
if (c->bankrupt_value == 0) {
|
||||
@@ -1488,12 +1502,12 @@ extern int GetAmountOwnedBy(const Company *c, Owner owner);
|
||||
CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
CommandCost cost(EXPENSES_OTHER);
|
||||
CompanyID target_company = (CompanyID)p1;
|
||||
Company *c = Company::GetIfValid(target_company);
|
||||
|
||||
Company *c = Company::GetIfValid(p1);
|
||||
|
||||
/* Check if buying shares is allowed (protection against modified clients)
|
||||
* Cannot buy own shares */
|
||||
if (c == NULL || !_settings_game.economy.allow_shares || _current_company == target_company) return CMD_ERROR;
|
||||
if (c == NULL || !_settings_game.economy.allow_shares || _current_company == (CompanyID)p1) return CMD_ERROR;
|
||||
|
||||
/* Protect new companies from hostile takeovers */
|
||||
if (_cur_year - c->inaugurated_year < 6) return_cmd_error(STR_ERROR_PROTECTED);
|
||||
@@ -1519,7 +1533,7 @@ CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
break;
|
||||
}
|
||||
}
|
||||
SetWindowDirty(WC_COMPANY, target_company);
|
||||
SetWindowDirty(WC_COMPANY, p1);
|
||||
}
|
||||
return cost;
|
||||
}
|
||||
@@ -1534,12 +1548,11 @@ CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
*/
|
||||
CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
CompanyID target_company = (CompanyID)p1;
|
||||
Company *c = Company::GetIfValid(target_company);
|
||||
Company *c = Company::GetIfValid(p1);
|
||||
|
||||
/* Check if selling shares is allowed (protection against modified clients)
|
||||
* Cannot sell own shares */
|
||||
if (c == NULL || !_settings_game.economy.allow_shares || _current_company == target_company) return CMD_ERROR;
|
||||
if (c == NULL || !_settings_game.economy.allow_shares || _current_company == (CompanyID)p1) return CMD_ERROR;
|
||||
|
||||
/* Those lines are here for network-protection (clients can be slow) */
|
||||
if (GetAmountOwnedBy(c, _current_company) == 0) return CommandCost();
|
||||
@@ -1552,7 +1565,7 @@ CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1
|
||||
OwnerByte *b = c->share_owners;
|
||||
while (*b != _current_company) b++; // share owners is guaranteed to contain company
|
||||
*b = COMPANY_SPECTATOR;
|
||||
SetWindowDirty(WC_COMPANY, target_company);
|
||||
SetWindowDirty(WC_COMPANY, p1);
|
||||
}
|
||||
return CommandCost(EXPENSES_OTHER, cost);
|
||||
}
|
||||
@@ -1570,8 +1583,7 @@ CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1
|
||||
*/
|
||||
CommandCost CmdBuyCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
CompanyID target_company = (CompanyID)p1;
|
||||
Company *c = Company::GetIfValid(target_company);
|
||||
Company *c = Company::GetIfValid(p1);
|
||||
if (c == NULL) return CMD_ERROR;
|
||||
|
||||
/* Disable takeovers when not asked */
|
||||
@@ -1581,7 +1593,7 @@ CommandCost CmdBuyCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
if (!_networking && _local_company == c->index) return CMD_ERROR;
|
||||
|
||||
/* Do not allow companies to take over themselves */
|
||||
if (target_company == _current_company) return CMD_ERROR;
|
||||
if ((CompanyID)p1 == _current_company) return CMD_ERROR;
|
||||
|
||||
/* Get the cost here as the company is deleted in DoAcquireCompany. */
|
||||
CommandCost cost(EXPENSES_OTHER, c->bankrupt_value);
|
||||
|
||||
+9
-30
@@ -165,20 +165,20 @@ static TrackBits MaskWireBits(TileIndex t, TrackBits tracks)
|
||||
/**
|
||||
* Get the base wire sprite to use.
|
||||
*/
|
||||
static inline SpriteID GetWireBase(TileIndex tile, bool upper_halftile = false)
|
||||
static inline SpriteID GetWireBase(TileIndex tile)
|
||||
{
|
||||
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
|
||||
SpriteID wires = GetCustomRailSprite(rti, tile, RTSG_WIRES, upper_halftile);
|
||||
SpriteID wires = GetCustomRailSprite(rti, tile, RTSG_WIRES);
|
||||
return wires == 0 ? SPR_WIRE_BASE : wires;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the base pylon sprite to use.
|
||||
*/
|
||||
static inline SpriteID GetPylonBase(TileIndex tile, bool upper_halftile = false)
|
||||
static inline SpriteID GetPylonBase(TileIndex tile)
|
||||
{
|
||||
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
|
||||
SpriteID pylons = GetCustomRailSprite(rti, tile, RTSG_PYLONS, upper_halftile);
|
||||
SpriteID pylons = GetCustomRailSprite(rti, tile, RTSG_PYLONS);
|
||||
return pylons == 0 ? SPR_PYLON_BASE : pylons;
|
||||
}
|
||||
|
||||
@@ -274,11 +274,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
||||
|
||||
/* Half tile slopes coincide only with horizontal/vertical track.
|
||||
* Faking a flat slope results in the correct sprites on positions. */
|
||||
Corner halftile_corner = CORNER_INVALID;
|
||||
if (IsHalftileSlope(tileh[TS_HOME])) {
|
||||
halftile_corner = GetHalftileSlopeCorner(tileh[TS_HOME]);
|
||||
tileh[TS_HOME] = SLOPE_FLAT;
|
||||
}
|
||||
if (IsHalftileSlope(tileh[TS_HOME])) tileh[TS_HOME] = SLOPE_FLAT;
|
||||
|
||||
TLG tlg = GetTLG(ti->tile);
|
||||
byte PCPstatus = 0;
|
||||
@@ -299,17 +295,9 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
||||
|
||||
AdjustTileh(ti->tile, &tileh[TS_HOME]);
|
||||
|
||||
SpriteID pylon_normal = GetPylonBase(ti->tile);
|
||||
SpriteID pylon_halftile = (halftile_corner != CORNER_INVALID) ? GetPylonBase(ti->tile, true) : pylon_normal;
|
||||
SpriteID pylon_base = GetPylonBase(ti->tile);
|
||||
|
||||
for (DiagDirection i = DIAGDIR_BEGIN; i < DIAGDIR_END; i++) {
|
||||
static const uint edge_corners[] = {
|
||||
1 << CORNER_N | 1 << CORNER_E, // DIAGDIR_NE
|
||||
1 << CORNER_S | 1 << CORNER_E, // DIAGDIR_SE
|
||||
1 << CORNER_S | 1 << CORNER_W, // DIAGDIR_SW
|
||||
1 << CORNER_N | 1 << CORNER_W, // DIAGDIR_NW
|
||||
};
|
||||
SpriteID pylon_base = (halftile_corner != CORNER_INVALID && HasBit(edge_corners[i], halftile_corner)) ? pylon_halftile : pylon_normal;
|
||||
TileIndex neighbour = ti->tile + TileOffsByDiagDir(i);
|
||||
Foundation foundation = FOUNDATION_NONE;
|
||||
byte elevation = GetPCPElevation(ti->tile, i);
|
||||
@@ -438,21 +426,11 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
||||
if (height <= GetTileMaxZ(ti->tile) + TILE_HEIGHT) return;
|
||||
}
|
||||
|
||||
SpriteID wire_normal = GetWireBase(ti->tile);
|
||||
SpriteID wire_halftile = (halftile_corner != CORNER_INVALID) ? GetWireBase(ti->tile, true) : wire_normal;
|
||||
Track halftile_track;
|
||||
switch (halftile_corner) {
|
||||
case CORNER_W: halftile_track = TRACK_LEFT; break;
|
||||
case CORNER_S: halftile_track = TRACK_LOWER; break;
|
||||
case CORNER_E: halftile_track = TRACK_RIGHT; break;
|
||||
case CORNER_N: halftile_track = TRACK_UPPER; break;
|
||||
default: halftile_track = INVALID_TRACK; break;
|
||||
}
|
||||
SpriteID wire_base = GetWireBase(ti->tile);
|
||||
|
||||
/* Drawing of pylons is finished, now draw the wires */
|
||||
for (Track t = TRACK_BEGIN; t < TRACK_END; t++) {
|
||||
if (HasBit(wireconfig[TS_HOME], t)) {
|
||||
SpriteID wire_base = (t == halftile_track) ? wire_halftile : wire_normal;
|
||||
byte PCPconfig = HasBit(PCPstatus, PCPpositions[t][0]) +
|
||||
(HasBit(PCPstatus, PCPpositions[t][1]) << 1);
|
||||
|
||||
@@ -601,7 +579,8 @@ bool SettingsDisableElrail(int32 p1)
|
||||
FOR_ALL_TRAINS(t) {
|
||||
/* power and acceleration is cached only for front engines */
|
||||
if (t->IsFrontEngine()) {
|
||||
t->ConsistChanged(true);
|
||||
t->PowerChanged();
|
||||
t->UpdateAcceleration();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -808,8 +808,6 @@ bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company)
|
||||
/* check if it's available */
|
||||
if (!HasBit(e->company_avail, company)) return false;
|
||||
|
||||
if (e->info.string_id == STR_NEWGRF_INVALID_ENGINE) return false;
|
||||
|
||||
if (type == VEH_TRAIN) {
|
||||
/* Check if the rail type is available to this company */
|
||||
const Company *c = Company::Get(company);
|
||||
|
||||
+69
-67
@@ -44,7 +44,7 @@ struct Fio {
|
||||
FILE *handles[MAX_FILE_SLOTS]; ///< array of file handles we can have open
|
||||
byte buffer_start[FIO_BUFFER_SIZE]; ///< local buffer when read from file
|
||||
const char *filenames[MAX_FILE_SLOTS]; ///< array of filenames we (should) have open
|
||||
char *shortnames[MAX_FILE_SLOTS]; ///< array of short names for spriteloader's use
|
||||
char *shortnames[MAX_FILE_SLOTS];///< array of short names for spriteloader's use
|
||||
#if defined(LIMITED_FDS)
|
||||
uint open_handles; ///< current amount of open handles
|
||||
uint usage_count[MAX_FILE_SLOTS]; ///< count how many times this file has been opened
|
||||
@@ -53,9 +53,6 @@ struct Fio {
|
||||
|
||||
static Fio _fio;
|
||||
|
||||
/** Whether the working directory should be scanned. */
|
||||
static bool _do_scan_working_directory = true;
|
||||
|
||||
/* Get current position in file */
|
||||
size_t FioGetPos()
|
||||
{
|
||||
@@ -451,21 +448,16 @@ void FioCreateDirectory(const char *name)
|
||||
* It does not add the path separator to zero-sized strings.
|
||||
* @param buf string to append the separator to
|
||||
* @param buflen the length of the buf
|
||||
* @return true iff the operation succeeded
|
||||
*/
|
||||
bool AppendPathSeparator(char *buf, size_t buflen)
|
||||
void AppendPathSeparator(char *buf, size_t buflen)
|
||||
{
|
||||
size_t s = strlen(buf);
|
||||
|
||||
/* Length of string + path separator + '\0' */
|
||||
if (s != 0 && buf[s - 1] != PATHSEPCHAR) {
|
||||
if (s + 2 >= buflen) return false;
|
||||
|
||||
if (s != 0 && buf[s - 1] != PATHSEPCHAR && s + 2 < buflen) {
|
||||
buf[s] = PATHSEPCHAR;
|
||||
buf[s + 1] = '\0';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -542,18 +534,7 @@ static void SimplifyFileName(char *name)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* static */ uint TarScanner::DoScan() {
|
||||
DEBUG(misc, 1, "Scanning for tars");
|
||||
TarScanner fs;
|
||||
uint num = fs.Scan(".tar", DATA_DIR, false);
|
||||
num += fs.Scan(".tar", AI_DIR, false);
|
||||
num += fs.Scan(".tar", AI_LIBRARY_DIR, false);
|
||||
num += fs.Scan(".tar", SCENARIO_DIR, false);
|
||||
DEBUG(misc, 1, "Scan complete, found %d files", num);
|
||||
return num;
|
||||
}
|
||||
|
||||
bool TarScanner::AddFile(const char *filename, size_t basepath_length)
|
||||
bool TarListAddFile(const char *filename)
|
||||
{
|
||||
/* The TAR-header, repeated for every file */
|
||||
typedef struct TarHeader {
|
||||
@@ -582,11 +563,7 @@ bool TarScanner::AddFile(const char *filename, size_t basepath_length)
|
||||
if (it != _tar_list.end()) return false;
|
||||
|
||||
FILE *f = fopen(filename, "rb");
|
||||
/* Although the file has been found there can be
|
||||
* a number of reasons we cannot open the file.
|
||||
* Most common case is when we simply have not
|
||||
* been given read access. */
|
||||
if (f == NULL) return false;
|
||||
assert(f != NULL);
|
||||
|
||||
const char *dupped_filename = strdup(filename);
|
||||
_tar_list[filename].filename = dupped_filename;
|
||||
@@ -839,6 +816,66 @@ bool ExtractTar(const char *tar_filename)
|
||||
return true;
|
||||
}
|
||||
|
||||
static int ScanPathForTarFiles(const char *path, size_t basepath_length)
|
||||
{
|
||||
extern bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb);
|
||||
|
||||
uint num = 0;
|
||||
struct stat sb;
|
||||
struct dirent *dirent;
|
||||
DIR *dir;
|
||||
|
||||
if (path == NULL || (dir = ttd_opendir(path)) == NULL) return 0;
|
||||
|
||||
while ((dirent = readdir(dir)) != NULL) {
|
||||
const char *d_name = FS2OTTD(dirent->d_name);
|
||||
char filename[MAX_PATH];
|
||||
|
||||
if (!FiosIsValidFile(path, dirent, &sb)) continue;
|
||||
|
||||
snprintf(filename, lengthof(filename), "%s%s", path, d_name);
|
||||
|
||||
if (S_ISDIR(sb.st_mode)) {
|
||||
/* Directory */
|
||||
if (strcmp(d_name, ".") == 0 || strcmp(d_name, "..") == 0) continue;
|
||||
AppendPathSeparator(filename, lengthof(filename));
|
||||
num += ScanPathForTarFiles(filename, basepath_length);
|
||||
} else if (S_ISREG(sb.st_mode)) {
|
||||
/* File */
|
||||
char *ext = strrchr(filename, '.');
|
||||
|
||||
/* If no extension or extension isn't .tar, skip the file */
|
||||
if (ext == NULL) continue;
|
||||
if (strcasecmp(ext, ".tar") != 0) continue;
|
||||
|
||||
if (TarListAddFile(filename)) num++;
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
return num;
|
||||
}
|
||||
|
||||
void ScanForTarFiles()
|
||||
{
|
||||
Searchpath sp;
|
||||
char path[MAX_PATH];
|
||||
uint num = 0;
|
||||
|
||||
DEBUG(misc, 1, "Scanning for tars");
|
||||
FOR_ALL_SEARCHPATHS(sp) {
|
||||
FioAppendDirectory(path, MAX_PATH, sp, DATA_DIR);
|
||||
num += ScanPathForTarFiles(path, strlen(path));
|
||||
FioAppendDirectory(path, MAX_PATH, sp, AI_DIR);
|
||||
num += ScanPathForTarFiles(path, strlen(path));
|
||||
FioAppendDirectory(path, MAX_PATH, sp, AI_LIBRARY_DIR);
|
||||
num += ScanPathForTarFiles(path, strlen(path));
|
||||
FioAppendDirectory(path, MAX_PATH, sp, SCENARIO_DIR);
|
||||
num += ScanPathForTarFiles(path, strlen(path));
|
||||
}
|
||||
DEBUG(misc, 1, "Scan complete, found %d files", num);
|
||||
}
|
||||
|
||||
#if defined(WIN32) || defined(WINCE)
|
||||
/**
|
||||
* Determine the base (personal dir and game data dir) paths
|
||||
@@ -878,33 +915,6 @@ void ChangeWorkingDirectory(const char *exe)
|
||||
#endif /* WITH_COCOA */
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether we should scan the working directory.
|
||||
* It should not be scanned if it's the root or
|
||||
* the home directory as in both cases a big data
|
||||
* directory can cause huge amounts of unrelated
|
||||
* files scanned. Furthermore there are nearly no
|
||||
* use cases for the home/root directory to have
|
||||
* OpenTTD directories.
|
||||
* @return true if it should be scanned.
|
||||
*/
|
||||
bool DoScanWorkingDirectory()
|
||||
{
|
||||
/* No working directory, so nothing to do. */
|
||||
if (_searchpaths[SP_WORKING_DIR] == NULL) return false;
|
||||
|
||||
/* Working directory is root, so do nothing. */
|
||||
if (strcmp(_searchpaths[SP_WORKING_DIR], PATHSEP) == 0) return false;
|
||||
|
||||
/* No personal/home directory, so the working directory won't be that. */
|
||||
if (_searchpaths[SP_PERSONAL_DIR] == NULL) return true;
|
||||
|
||||
char tmp[MAX_PATH];
|
||||
snprintf(tmp, lengthof(tmp), "%s%s", _searchpaths[SP_WORKING_DIR], PERSONAL_DIR);
|
||||
AppendPathSeparator(tmp, MAX_PATH);
|
||||
return strcmp(tmp, _searchpaths[SP_PERSONAL_DIR]) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the base (personal dir and game data dir) paths
|
||||
* @param exe the path to the executable
|
||||
@@ -950,8 +960,6 @@ void DetermineBasePaths(const char *exe)
|
||||
_searchpaths[SP_WORKING_DIR] = strdup(tmp);
|
||||
#endif
|
||||
|
||||
_do_scan_working_directory = DoScanWorkingDirectory();
|
||||
|
||||
/* Change the working directory to that one of the executable */
|
||||
ChangeWorkingDirectory(exe);
|
||||
if (getcwd(tmp, MAX_PATH) == NULL) *tmp = '\0';
|
||||
@@ -992,10 +1000,7 @@ void DeterminePaths(const char *exe)
|
||||
DetermineBasePaths(exe);
|
||||
|
||||
Searchpath sp;
|
||||
FOR_ALL_SEARCHPATHS(sp) {
|
||||
if (sp == SP_WORKING_DIR && !_do_scan_working_directory) continue;
|
||||
DEBUG(misc, 4, "%s added as search path", _searchpaths[sp]);
|
||||
}
|
||||
FOR_ALL_SEARCHPATHS(sp) DEBUG(misc, 4, "%s added as search path", _searchpaths[sp]);
|
||||
|
||||
if (_config_file != NULL) {
|
||||
_personal_dir = strdup(_config_file);
|
||||
@@ -1070,7 +1075,7 @@ void DeterminePaths(const char *exe)
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
TarScanner::DoScan();
|
||||
ScanForTarFiles();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1149,7 +1154,7 @@ static uint ScanPath(FileScanner *fs, const char *extension, const char *path, s
|
||||
/* Directory */
|
||||
if (!recursive) continue;
|
||||
if (strcmp(d_name, ".") == 0 || strcmp(d_name, "..") == 0) continue;
|
||||
if (!AppendPathSeparator(filename, lengthof(filename))) continue;
|
||||
AppendPathSeparator(filename, lengthof(filename));
|
||||
num += ScanPath(fs, extension, filename, basepath_length, recursive);
|
||||
} else if (S_ISREG(sb.st_mode)) {
|
||||
/* File */
|
||||
@@ -1211,9 +1216,6 @@ uint FileScanner::Scan(const char *extension, Subdirectory sd, bool tars, bool r
|
||||
uint num = 0;
|
||||
|
||||
FOR_ALL_SEARCHPATHS(sp) {
|
||||
/* Don't search in the working directory */
|
||||
if (sp == SP_WORKING_DIR && !_do_scan_working_directory) continue;
|
||||
|
||||
FioAppendDirectory(path, MAX_PATH, sp, sd);
|
||||
num += ScanPath(this, extension, path, strlen(path), recursive);
|
||||
}
|
||||
@@ -1239,6 +1241,6 @@ uint FileScanner::Scan(const char *extension, const char *directory, bool recurs
|
||||
{
|
||||
char path[MAX_PATH];
|
||||
strecpy(path, directory, lastof(path));
|
||||
if (!AppendPathSeparator(path, lengthof(path))) return 0;
|
||||
AppendPathSeparator(path, lengthof(path));
|
||||
return ScanPath(this, extension, path, strlen(path), recursive);
|
||||
}
|
||||
|
||||
+1
-9
@@ -57,7 +57,7 @@ char *FioAppendDirectory(char *buf, size_t buflen, Searchpath sp, Subdirectory s
|
||||
char *FioGetDirectory(char *buf, size_t buflen, Subdirectory subdir);
|
||||
|
||||
void SanitizeFilename(char *filename);
|
||||
bool AppendPathSeparator(char *buf, size_t buflen);
|
||||
void AppendPathSeparator(char *buf, size_t buflen);
|
||||
void DeterminePaths(const char *exe);
|
||||
void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize);
|
||||
bool FileExists(const char *filename);
|
||||
@@ -87,14 +87,6 @@ public:
|
||||
virtual bool AddFile(const char *filename, size_t basepath_length) = 0;
|
||||
};
|
||||
|
||||
/** Helper for scanning for files with tar as extension */
|
||||
class TarScanner : FileScanner {
|
||||
public:
|
||||
/* virtual */ bool AddFile(const char *filename, size_t basepath_length);
|
||||
|
||||
/** Do the scan for Tars. */
|
||||
static uint DoScan();
|
||||
};
|
||||
|
||||
/* Implementation of opendir/readdir/closedir for Windows */
|
||||
#if defined(WIN32)
|
||||
|
||||
+7
-28
@@ -313,44 +313,23 @@ static int CALLBACK EnumFontCallback(const ENUMLOGFONTEX *logfont, const NEWTEXT
|
||||
if ((fs.fsCsb[0] & info->locale.lsCsbSupported[0]) == 0 && (fs.fsCsb[1] & info->locale.lsCsbSupported[1]) == 0) return 1;
|
||||
}
|
||||
|
||||
char font_name[MAX_PATH];
|
||||
#if defined(UNICODE)
|
||||
WIDE_TO_MB_BUFFER((const TCHAR*)logfont->elfFullName, font_name, lengthof(font_name));
|
||||
#else
|
||||
strecpy(font_name, (const TCHAR*)logfont->elfFullName, lastof(font_name));
|
||||
#endif
|
||||
|
||||
/* Add english name after font name */
|
||||
const char *english_name = GetEnglishFontName(logfont);
|
||||
strecpy(font_name + strlen(font_name) + 1, english_name, lastof(font_name));
|
||||
|
||||
/* Check whether we can actually load the font. */
|
||||
bool ft_init = _library != NULL;
|
||||
bool found = false;
|
||||
FT_Face face;
|
||||
/* Init FreeType if needed. */
|
||||
if ((ft_init || FT_Init_FreeType(&_library) == FT_Err_Ok) && GetFontByFaceName(font_name, &face) == FT_Err_Ok) {
|
||||
FT_Done_Face(face);
|
||||
found = true;
|
||||
}
|
||||
if (!ft_init) {
|
||||
/* Uninit FreeType if we did the init. */
|
||||
FT_Done_FreeType(_library);
|
||||
_library = NULL;
|
||||
}
|
||||
|
||||
if (!found) return 1;
|
||||
|
||||
const char *font_name = WIDE_TO_MB((const TCHAR*)logfont->elfFullName);
|
||||
DEBUG(freetype, 1, "Fallback font: %s (%s)", font_name, english_name);
|
||||
|
||||
strecpy(info->settings->small_font, font_name, lastof(info->settings->small_font));
|
||||
strecpy(info->settings->medium_font, font_name, lastof(info->settings->medium_font));
|
||||
strecpy(info->settings->large_font, font_name, lastof(info->settings->large_font));
|
||||
|
||||
/* Add english name after font name */
|
||||
strecpy(info->settings->small_font + strlen(info->settings->small_font) + 1, english_name, lastof(info->settings->small_font));
|
||||
strecpy(info->settings->medium_font + strlen(info->settings->medium_font) + 1, english_name, lastof(info->settings->medium_font));
|
||||
strecpy(info->settings->large_font + strlen(info->settings->large_font) + 1, english_name, lastof(info->settings->large_font));
|
||||
return 0; // stop enumerating
|
||||
}
|
||||
|
||||
bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, int winlangid, const char *str)
|
||||
{
|
||||
DEBUG(freetype, 1, "Trying fallback fonts");
|
||||
EFCParam langInfo;
|
||||
if (GetLocaleInfo(MAKELCID(winlangid, SORT_DEFAULT), LOCALE_FONTSIGNATURE, (LPTSTR)&langInfo.locale, sizeof(langInfo.locale) / sizeof(TCHAR)) == 0) {
|
||||
/* Invalid langid or some other mysterious error, can't determine fallback font. */
|
||||
|
||||
+2
-1
@@ -176,8 +176,9 @@ static void _GenerateWorld(void *)
|
||||
ShowNewGRFError();
|
||||
|
||||
if (_network_dedicated) DEBUG(net, 0, "Map generated, starting game");
|
||||
DEBUG(desync, 1, "new_map: %08x", _settings_game.game_creation.generation_seed);
|
||||
DEBUG(desync, 1, "new_map: %i\n", _settings_game.game_creation.generation_seed);
|
||||
|
||||
if (_settings_client.gui.pause_on_newgame && _game_mode == GM_NORMAL) DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
|
||||
if (_debug_desync_level > 0) {
|
||||
char name[MAX_PATH];
|
||||
snprintf(name, lengthof(name), "dmp_cmds_%08x_%08x.sav", _settings_game.game_creation.generation_seed, _date);
|
||||
|
||||
@@ -677,7 +677,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
||||
|
||||
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
|
||||
{
|
||||
EventState state = ES_NOT_HANDLED;
|
||||
EventState state;
|
||||
this->HandleEditBoxKey(GLAND_RANDOM_EDITBOX, key, keycode, state);
|
||||
/* the seed is unsigned, therefore atoi cannot be used.
|
||||
* As UINT32_MAX is a 'magic' value (use random seed) it
|
||||
|
||||
@@ -196,7 +196,6 @@ enum Colours {
|
||||
COLOUR_END,
|
||||
INVALID_COLOUR = 0xFF,
|
||||
};
|
||||
template <> struct EnumPropsT<Colours> : MakeEnumPropsT<Colours, byte, COLOUR_DARK_BLUE, COLOUR_END, INVALID_COLOUR, 4> {};
|
||||
|
||||
/** Colour of the strings, see _string_colourmap in table/palettes.h or docs/ottd-colourtext-palette.png */
|
||||
enum TextColour {
|
||||
|
||||
+3
-3
@@ -203,9 +203,9 @@ void GfxLoadSprites()
|
||||
GfxInitPalettes();
|
||||
}
|
||||
|
||||
bool GraphicsSet::FillSetDetails(IniFile *ini, const char *path, const char *full_filename)
|
||||
bool GraphicsSet::FillSetDetails(IniFile *ini, const char *path)
|
||||
{
|
||||
bool ret = this->BaseSet<GraphicsSet, MAX_GFT, DATA_DIR>::FillSetDetails(ini, path, full_filename, false);
|
||||
bool ret = this->BaseSet<GraphicsSet, MAX_GFT, DATA_DIR>::FillSetDetails(ini, path, false);
|
||||
if (ret) {
|
||||
IniGroup *metadata = ini->GetGroup("metadata");
|
||||
IniItem *item;
|
||||
@@ -213,7 +213,7 @@ bool GraphicsSet::FillSetDetails(IniFile *ini, const char *path, const char *ful
|
||||
fetch_metadata("palette");
|
||||
this->palette = (*item->value == 'D' || *item->value == 'd') ? PAL_DOS : PAL_WINDOWS;
|
||||
}
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+23
-35
@@ -88,11 +88,11 @@ struct GraphLegendWindow : Window {
|
||||
ToggleBit(_legend_excluded_companies, widget - GLW_FIRST_COMPANY);
|
||||
this->ToggleWidgetLoweredState(widget);
|
||||
this->SetDirty();
|
||||
InvalidateWindowData(WC_INCOME_GRAPH, 0);
|
||||
InvalidateWindowData(WC_OPERATING_PROFIT, 0);
|
||||
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
|
||||
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
|
||||
InvalidateWindowData(WC_COMPANY_VALUE, 0);
|
||||
SetWindowDirty(WC_INCOME_GRAPH, 0);
|
||||
SetWindowDirty(WC_OPERATING_PROFIT, 0);
|
||||
SetWindowDirty(WC_DELIVERED_CARGO, 0);
|
||||
SetWindowDirty(WC_PERFORMANCE_HISTORY, 0);
|
||||
SetWindowDirty(WC_COMPANY_VALUE, 0);
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
@@ -199,33 +199,25 @@ protected:
|
||||
byte colours[GRAPH_MAX_DATASETS];
|
||||
OverflowSafeInt64 cost[GRAPH_MAX_DATASETS][GRAPH_NUM_MONTHS]; ///< Stored costs for the last #GRAPH_NUM_MONTHS months
|
||||
|
||||
/**
|
||||
* Get the highest value of the graph's data. Excluded data is ignored to allow showing smaller values in
|
||||
* better detail when disabling higher ones.
|
||||
* @return Highest value of the graph (ignoring disabled data).
|
||||
*/
|
||||
int64 GetHighestValue() const
|
||||
int64 GetHighestValue(int initial_highest_value) const
|
||||
{
|
||||
OverflowSafeInt64 highest_value = 0;
|
||||
OverflowSafeInt64 highest_value = initial_highest_value;
|
||||
|
||||
for (int i = 0; i < this->num_dataset; i++) {
|
||||
if (HasBit(this->excluded_data, i)) continue;
|
||||
for (int j = 0; j < this->num_on_x_axis; j++) {
|
||||
OverflowSafeInt64 datapoint = this->cost[i][j];
|
||||
if (!HasBit(this->excluded_data, i)) {
|
||||
for (int j = 0; j < this->num_on_x_axis; j++) {
|
||||
OverflowSafeInt64 datapoint = this->cost[i][j];
|
||||
|
||||
if (datapoint != INVALID_DATAPOINT) {
|
||||
/* For now, if the graph has negative values the scaling is
|
||||
* symmetrical about the x axis, so take the absolute value
|
||||
* of each data point. */
|
||||
highest_value = max(highest_value, abs(datapoint));
|
||||
if (datapoint != INVALID_DATAPOINT) {
|
||||
/* For now, if the graph has negative values the scaling is
|
||||
* symmetrical about the x axis, so take the absolute value
|
||||
* of each data point. */
|
||||
highest_value = max(highest_value, abs(datapoint));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Prevent showing the highest value too close to the graph upper limit. */
|
||||
highest_value = (11 * highest_value) / 10;
|
||||
/* Avoid using zero as the highest value. */
|
||||
if (highest_value == 0) highest_value = GRAPH_NUM_LINES_Y - 1;
|
||||
/* Round up highest_value so that it will divide cleanly into the number of
|
||||
* axis labels used. */
|
||||
int round_val = highest_value % (GRAPH_NUM_LINES_Y - 1);
|
||||
@@ -282,7 +274,13 @@ protected:
|
||||
r.left += 9;
|
||||
r.right -= 5;
|
||||
|
||||
highest_value = GetHighestValue();
|
||||
/* Start of with a highest_value of twice the height of the graph in pixels.
|
||||
* It's a bit arbitrary, but it makes the cargo payment graph look a little
|
||||
* nicer, and prevents division by zero when calculating where the datapoint
|
||||
* should be drawn. */
|
||||
highest_value = r.bottom - r.top + 1;
|
||||
if (!this->has_negative_values) highest_value *= 2;
|
||||
highest_value = GetHighestValue(highest_value);
|
||||
|
||||
/* Get width for Y labels */
|
||||
int label_width = GetYLabelWidth(highest_value);
|
||||
@@ -526,11 +524,6 @@ public:
|
||||
this->UpdateStatistics(false);
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
this->UpdateStatistics(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the statistics.
|
||||
* @param initialize Initialize the data structure.
|
||||
@@ -903,11 +896,6 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
/* Override default OnTick */
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
this->OnHundredthTick();
|
||||
}
|
||||
|
||||
virtual void OnHundredthTick()
|
||||
{
|
||||
this->excluded_data = _legend_excluded_cargo;
|
||||
|
||||
+8
-8
@@ -10,7 +10,6 @@
|
||||
/** @file group_cmd.cpp Handling of the engine groups */
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "cmd_helper.h"
|
||||
#include "command_func.h"
|
||||
#include "group.h"
|
||||
#include "train.h"
|
||||
@@ -83,7 +82,7 @@ void InitializeGroup()
|
||||
*/
|
||||
CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
VehicleType vt = Extract<VehicleType, 0, 3>(p1);
|
||||
VehicleType vt = (VehicleType)p1;
|
||||
if (!IsCompanyBuildableVehicleType(vt)) return CMD_ERROR;
|
||||
|
||||
if (!Group::CanAllocateItem()) return CMD_ERROR;
|
||||
@@ -259,12 +258,13 @@ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
*/
|
||||
CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
VehicleType type = Extract<VehicleType, 0, 3>(p2);
|
||||
GroupID id_g = p1;
|
||||
if (!Group::IsValidID(id_g) || !IsCompanyBuildableVehicleType(type)) return CMD_ERROR;
|
||||
VehicleType type = (VehicleType)p2;
|
||||
if (!Group::IsValidID(p1) || !IsCompanyBuildableVehicleType(type)) return CMD_ERROR;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
Vehicle *v;
|
||||
VehicleType type = (VehicleType)p2;
|
||||
GroupID id_g = p1;
|
||||
|
||||
/* Find the first front engine which belong to the group id_g
|
||||
* then add all shared vehicles of this front engine to the group id_g */
|
||||
@@ -298,13 +298,13 @@ CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32
|
||||
*/
|
||||
CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
{
|
||||
GroupID old_g = p1;
|
||||
Group *g = Group::GetIfValid(old_g);
|
||||
VehicleType type = Extract<VehicleType, 0, 3>(p2);
|
||||
Group *g = Group::GetIfValid(p1);
|
||||
VehicleType type = (VehicleType)p2;
|
||||
|
||||
if (g == NULL || g->owner != _current_company || !IsCompanyBuildableVehicleType(type)) return CMD_ERROR;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
GroupID old_g = p1;
|
||||
Vehicle *v;
|
||||
|
||||
/* Find each Vehicle that belongs to the group old_g and add it to the default group */
|
||||
|
||||
+3
-3
@@ -381,12 +381,12 @@ public:
|
||||
{
|
||||
switch (widget) {
|
||||
case GRP_WIDGET_ALL_VEHICLES:
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT + 8, r.right - WD_FRAMERECT_RIGHT - 8, r.top + WD_FRAMERECT_TOP + 1,
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT + 8, r.right - WD_FRAMERECT_RIGHT - 8, r.top + WD_MATRIX_TOP,
|
||||
STR_GROUP_ALL_TRAINS + this->vehicle_type, IsAllGroupID(this->group_sel) ? TC_WHITE : TC_BLACK);
|
||||
break;
|
||||
|
||||
case GRP_WIDGET_DEFAULT_VEHICLES:
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT + 8, r.right - WD_FRAMERECT_RIGHT - 8, r.top + WD_FRAMERECT_TOP + 1,
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT + 8, r.right - WD_FRAMERECT_RIGHT - 8, r.top + WD_MATRIX_TOP,
|
||||
STR_GROUP_DEFAULT_TRAINS + this->vehicle_type, IsDefaultGroupID(this->group_sel) ? TC_WHITE : TC_BLACK);
|
||||
break;
|
||||
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
|
||||
/* draw the selected group in white, else we draw it in black */
|
||||
SetDParam(0, g->index);
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT + 8, r.right - WD_FRAMERECT_RIGHT - 8, y1, STR_GROUP_NAME, (this->group_sel == g->index) ? TC_WHITE : TC_BLACK);
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT + 8, r.right - WD_FRAMERECT_RIGHT, y1, STR_GROUP_NAME, (this->group_sel == g->index) ? TC_WHITE : TC_BLACK);
|
||||
|
||||
/* draw the number of vehicles of the group */
|
||||
SetDParam(0, g->num_vehicle);
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ extern IndustryPool _industry_pool;
|
||||
* Defines the internal data of a functionnal industry
|
||||
*/
|
||||
struct Industry : IndustryPool::PoolItem<&_industry_pool> {
|
||||
typedef PersistentStorageArray<int32, 16> PersistentStorage;
|
||||
typedef PersistentStorageArray<uint32, 16> PersistentStorage;
|
||||
|
||||
TileArea location; ///< Location of the industry
|
||||
const Town *town; ///< Nearest town
|
||||
|
||||
+27
-12
@@ -1512,14 +1512,31 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags,
|
||||
}
|
||||
|
||||
|
||||
static bool CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int type)
|
||||
static bool CheckIfFarEnoughFromIndustry(TileIndex tile, int type)
|
||||
{
|
||||
const IndustrySpec *indspec = GetIndustrySpec(type);
|
||||
const Industry *i;
|
||||
|
||||
if (_settings_game.economy.same_industry_close && indspec->IsRawIndustry())
|
||||
/* Allow primary industries to be placed close to any other industry */
|
||||
return true;
|
||||
|
||||
FOR_ALL_INDUSTRIES(i) {
|
||||
/* Within 14 tiles from another industry is considered close */
|
||||
bool in_low_distance = DistanceMax(tile, i->location.tile) <= 14;
|
||||
|
||||
/* check if an industry that accepts the same goods is nearby */
|
||||
if (in_low_distance &&
|
||||
!indspec->IsRawIndustry() && // not a primary industry?
|
||||
indspec->accepts_cargo[0] == i->accepts_cargo[0] && (
|
||||
/* at least one of those options must be true */
|
||||
_game_mode != GM_EDITOR || // editor must not be stopped
|
||||
!_settings_game.economy.same_industry_close ||
|
||||
!_settings_game.economy.multiple_industry_per_town)) {
|
||||
_error_message = STR_ERROR_INDUSTRY_TOO_CLOSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* check if there are any conflicting industry types around */
|
||||
if ((i->type == indspec->conflicting[0] ||
|
||||
i->type == indspec->conflicting[1] ||
|
||||
@@ -1688,7 +1705,7 @@ static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, DoCo
|
||||
}
|
||||
|
||||
if (!custom_shape_check && _settings_game.game_creation.land_generator == LG_TERRAGENESIS && _generating_world && !_ignore_restrictions && !CheckIfCanLevelIndustryPlatform(tile, DC_NO_WATER, it, type)) return NULL;
|
||||
if (!CheckIfFarEnoughFromConflictingIndustry(tile, type)) return NULL;
|
||||
if (!CheckIfFarEnoughFromIndustry(tile, type)) return NULL;
|
||||
|
||||
const Town *t = FindTownForIndustry(tile, type);
|
||||
if (t == NULL) return NULL;
|
||||
@@ -1736,10 +1753,6 @@ CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
return CMD_ERROR;
|
||||
}
|
||||
|
||||
if (_game_mode != GM_EDITOR && !CheckIfCallBackAllowsAvailability(it, IACT_USERCREATION)) {
|
||||
return CMD_ERROR;
|
||||
}
|
||||
|
||||
const Industry *ind = NULL;
|
||||
if (_game_mode != GM_EDITOR && _settings_game.construction.raw_industry_construction == 2 && indspec->IsRawIndustry()) {
|
||||
if (flags & DC_EXEC) {
|
||||
@@ -1909,9 +1922,12 @@ void GenerateIndustries()
|
||||
|
||||
static void UpdateIndustryStatistics(Industry *i)
|
||||
{
|
||||
byte pct;
|
||||
bool refresh = false;
|
||||
|
||||
for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
|
||||
if (i->produced_cargo[j] != CT_INVALID) {
|
||||
byte pct = 0;
|
||||
pct = 0;
|
||||
if (i->this_month_production[j] != 0) {
|
||||
i->last_prod_year = _cur_year;
|
||||
pct = min(i->this_month_transported[j] * 256 / i->this_month_production[j], 255);
|
||||
@@ -1923,8 +1939,11 @@ static void UpdateIndustryStatistics(Industry *i)
|
||||
|
||||
i->last_month_transported[j] = i->this_month_transported[j];
|
||||
i->this_month_transported[j] = 0;
|
||||
refresh = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (refresh) SetWindowDirty(WC_INDUSTRY_VIEW, i->index);
|
||||
}
|
||||
|
||||
/** Simple helper that will collect data for the generation of industries */
|
||||
@@ -2380,10 +2399,7 @@ void IndustryDailyLoop()
|
||||
MaybeNewIndustry();
|
||||
} else {
|
||||
Industry *i = Industry::GetRandom();
|
||||
if (i != NULL) {
|
||||
ChangeIndustryProduction(i, false);
|
||||
SetWindowDirty(WC_INDUSTRY_VIEW, i->index);
|
||||
}
|
||||
if (i != NULL) ChangeIndustryProduction(i, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2405,7 +2421,6 @@ void IndustryMonthlyLoop()
|
||||
delete i;
|
||||
} else {
|
||||
ChangeIndustryProduction(i, true);
|
||||
SetWindowDirty(WC_INDUSTRY_VIEW, i->index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-16
@@ -374,13 +374,15 @@ public:
|
||||
uint16 callback_res = GetIndustryCallback(CBID_INDUSTRY_FUND_MORE_TEXT, 0, 0, NULL, this->selected_type, INVALID_TILE);
|
||||
if (callback_res != CALLBACK_FAILED) { // Did it fail?
|
||||
str = GetGRFStringID(indsp->grf_prop.grffile->grfid, 0xD000 + callback_res); // No. here's the new string
|
||||
if (str != STR_UNDEFINED) {
|
||||
PrepareTextRefStackUsage(6);
|
||||
DrawStringMultiLine(left, right, y, bottom, str);
|
||||
StopTextRefStackUsage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw the Additional purchase text, provided by newgrf callback, if any.
|
||||
* Otherwhise, will print Nothing */
|
||||
if (str != STR_NULL && str != STR_UNDEFINED) {
|
||||
SetDParam(0, str);
|
||||
DrawStringMultiLine(left, right, y, bottom, STR_JUST_STRING);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
@@ -404,10 +406,8 @@ public:
|
||||
|
||||
this->SetDirty();
|
||||
|
||||
if (GetCallbackWnd() == this &&
|
||||
((_game_mode != GM_EDITOR && _settings_game.construction.raw_industry_construction == 2 && indsp != NULL && indsp->IsRawIndustry()) ||
|
||||
this->selected_type == INVALID_INDUSTRYTYPE ||
|
||||
!this->enabled[this->selected_index])) {
|
||||
if ((_game_mode != GM_EDITOR && _settings_game.construction.raw_industry_construction == 2 && indsp != NULL && indsp->IsRawIndustry()) ||
|
||||
this->selected_type == INVALID_INDUSTRYTYPE) {
|
||||
/* Reset the button state if going to prospecting or "build many industries" */
|
||||
this->RaiseButtons();
|
||||
ResetObjectToPlace();
|
||||
@@ -955,14 +955,18 @@ protected:
|
||||
/** Sort industries by production and name */
|
||||
static int CDECL IndustryProductionSorter(const Industry * const *a, const Industry * const *b)
|
||||
{
|
||||
uint prod_a = 0, prod_b = 0;
|
||||
for (uint i = 0; i < lengthof((*a)->produced_cargo); i++) {
|
||||
if ((*a)->produced_cargo[i] != CT_INVALID) prod_a += (*a)->last_month_production[i];
|
||||
if ((*b)->produced_cargo[i] != CT_INVALID) prod_b += (*b)->last_month_production[i];
|
||||
}
|
||||
int r = prod_a - prod_b;
|
||||
int r = 0;
|
||||
|
||||
return (r == 0) ? IndustryTypeSorter(a, b) : r;
|
||||
if ((*a)->produced_cargo[0] == CT_INVALID) {
|
||||
if ((*b)->produced_cargo[0] != CT_INVALID) return -1;
|
||||
} else {
|
||||
if ((*b)->produced_cargo[0] == CT_INVALID) return 1;
|
||||
|
||||
r = ((*a)->last_month_production[0] + (*a)->last_month_production[1]) -
|
||||
((*b)->last_month_production[0] + (*b)->last_month_production[1]);
|
||||
}
|
||||
|
||||
return (r == 0) ? IndustryNameSorter(a, b) : r;
|
||||
}
|
||||
|
||||
/** Sort industries by transported cargo and name */
|
||||
|
||||
+1
-5
@@ -604,8 +604,8 @@ CommandCost CmdLandscapeClear(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
|
||||
|
||||
/** Clear a big piece of landscape
|
||||
* @param tile end tile of area dragging
|
||||
* @param flags of operation to conduct
|
||||
* @param p1 start tile of area dragging
|
||||
* @param flags of operation to conduct
|
||||
* @param p2 unused
|
||||
* @param text unused
|
||||
* @return the cost of this operation or an error
|
||||
@@ -827,8 +827,6 @@ static void CreateDesertOrRainForest()
|
||||
for (TileIndex tile = 0; tile != MapSize(); ++tile) {
|
||||
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||
|
||||
if (!IsValidTile(tile)) continue;
|
||||
|
||||
for (data = _make_desert_or_rainforest_data;
|
||||
data != endof(_make_desert_or_rainforest_data); ++data) {
|
||||
TileIndex t = AddTileIndexDiffCWrap(tile, *data);
|
||||
@@ -847,8 +845,6 @@ static void CreateDesertOrRainForest()
|
||||
for (TileIndex tile = 0; tile != MapSize(); ++tile) {
|
||||
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||
|
||||
if (!IsValidTile(tile)) continue;
|
||||
|
||||
for (data = _make_desert_or_rainforest_data;
|
||||
data != endof(_make_desert_or_rainforest_data); ++data) {
|
||||
TileIndex t = AddTileIndexDiffCWrap(tile, *data);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user