MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / orderUpCommand

Function orderUpCommand

src/OpenLoco/src/Ui/Windows/Vehicle.cpp:2914–2925  ·  view source on GitHub ↗

0x004B4C14

Source from the content-addressed store, hash-verified

2912
2913 // 0x004B4C14
2914 static bool orderUpCommand(Vehicles::VehicleHead* const head, const uint32_t orderOffset)
2915 {
2916 GameCommands::VehicleOrderUpArgs args{};
2917 args.head = head->id;
2918 args.orderOffset = orderOffset - head->orderTableOffset;
2919
2920 GameCommands::setErrorTitle(StringIds::empty);
2921 auto result = GameCommands::doCommand(args, GameCommands::Flags::apply);
2922
2923 Vehicles::OrderManager::generateNumDisplayFrames(head); // Note: order changed, check if this matters.
2924 return result != GameCommands::kFailure;
2925 }
2926
2927 // 0x004B4CCB based on
2928 static bool orderDownCommand(Vehicles::VehicleHead* const head, const uint32_t orderOffset)

Callers

nothing calls this directly

Calls 3

setErrorTitleFunction · 0.85
generateNumDisplayFramesFunction · 0.85
doCommandFunction · 0.50

Tested by

no test coverage detected