applied failed hunks manually
Merge branch 'apply_patch' into tbtr
Merge branch 'master' into compile
WDF_UNCLICK_BUTTONS undefined

>> error message:
[SRC] Compiling aaa_template_gui_create.cpp
/home/streen/OpenTTD/trunk/src/aaa_template_gui_create.cpp:91:2: error: ‘WDF_UNCLICK_BUTTONS’ was not declared in this scope

* also removed from:
	aaa_template_gui_main.cpp
	aaa_template_gui_replace_all.cpp
	aaa_template_gui_create_virtualtrain.cpp

>> desc:
* Was defined in window_gui.h :: enum WindowDefaultFlag
* enum still exists, but this entry is gone
Function ListPositionEngine undefined

>> error msg:
[SRC] Compiling aaa_template_gui_create_virtualtrain.cpp
/home/streen/OpenTTD/trunk/src/aaa_template_gui_create_virtualtrain.cpp: In function ‘int EngineNumberSorter(const EngineID*, const EngineID*)’:
/home/streen/OpenTTD/trunk/src/aaa_template_gui_create_virtualtrain.cpp:103:33: error: ‘ListPositionOfEngine’ was not declared in this scope

>> desc:
This was just copied from autoreplace_gui.cpp but has changed since tbtr_v0.4c.
There is a new property
	(struct) Engine::list_position

>> symmetrical fixes:
	aaa_template_gui_replaceall.cpp
VehicleCargoList::Count() undefined

>> error msg:
/home/streen/OpenTTD/trunk/src/aaa_template_vehicle_func.cpp: In function ‘void TransferCargoForTrain(Train*, Train*, bool)’:
/home/streen/OpenTTD/trunk/src/aaa_template_vehicle_func.cpp:549:50: error: ‘class VehicleCargoList’ has no member named ‘Count’
/home/streen/OpenTTD/trunk/src/aaa_template_vehicle_func.cpp:552:59: error: ‘class VehicleCargoList’ has no member named ‘Count’
/home/streen/OpenTTD/trunk/src/aaa_template_vehicle_func.cpp:560:33: error: ‘class VehicleCargoList’ has no member named ‘Count’
/home/streen/OpenTTD/trunk/src/aaa_template_vehicle_func.cpp:560:72: error: ‘class VehicleCargoList’ has no member named ‘Count’

>> desc:
* Was defined in cargopacket.h : enum MoveToAction
* Those values have changed, we use StoredCount() instead of Count() now

>> symmetrical fixes:
all above
Cargo shifting function replaced

>> error msg:
/home/streen/OpenTTD/trunk/src/aaa_template_vehicle_func.cpp: In function ‘void TransferCargoForTrain(Train*, Train*, bool)’:
/home/streen/OpenTTD/trunk/src/aaa_template_vehicle_func.cpp:563:15: error: ‘class VehicleCargoList’ has no member named ‘MoveTo’
/home/streen/OpenTTD/trunk/src/aaa_template_vehicle_func.cpp:563:44: error: ‘MTA_UNLOAD’ is not a member of ‘VehicleCargoList’

>> desc:
* Method (Vehicle?)CargoList::MoveTo() doesn't exist anymore, has been replaced by (...)Shift(...) methods
* Both errors above are fixed by using VehicleCargo::Shift(int, VC*) instead of MoveTo()

>> symmetrical fixes:
NewVehicleResolver undefined

>> error msg:
[SRC] Compiling newgrf_engine.cpp
/home/streen/OpenTTD/trunk/src/newgrf_engine.cpp: In function ‘void NewVehicleResolverWrapper(ResolverObject*, EngineID)’:
/home/streen/OpenTTD/trunk/src/newgrf_engine.cpp:1049:32: error: ‘NewVehicleResolver’ was not declared in this scope

>> desc:
* Was used for own definition of NewVehicleResolverWrapper
* N.V.R.W. is not used anywhere, can't remember what its purpose initially was
* removed definition and implementation of N.V.R.W. which also removes the missing dependency from the error

>> symmetrical fixes:
Merge branch 'apply_patch' into compile

remerged because of forgotten item from the reject list of patch tbtr_v0.4c.patch
Merge branch 'compile'
deleted initial apply.log
saveload code