Merge branch 'master' into jgrpp
# Conflicts: # src/ai/ai_core.cpp # src/ai/ai_gui.cpp # src/ai/ai_instance.cpp # src/console_cmds.cpp # src/engine_type.h # src/game/game_gui.cpp # src/game/game_instance.cpp # src/goal.cpp # src/goal_cmd.h # src/lang/english.txt # src/lang/estonian.txt # src/network/network_client.cpp # src/newgrf.cpp # src/newgrf_generic.h # src/openttd.cpp # src/saveload/saveload.h # src/script/api/script_log.cpp # src/script/api/script_town.cpp # src/settings_table.cpp # src/station_cmd.cpp # src/station_cmd.h # src/station_map.h # src/strings.cpp # src/table/settings/difficulty_settings.ini # src/table/settings/gui_settings.ini # src/tbtr_template_gui_main.h # src/timetable_cmd.cpp # src/timetable_cmd.h # src/timetable_gui.cpp # src/town_gui.cpp # src/train_gui.cpp # src/water_cmd.cpp
This commit is contained in:
12
src/goal.cpp
12
src/goal.cpp
@@ -234,19 +234,23 @@ CommandCost CmdSetGoalCompleted(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
* @param flags type of operation
|
||||
* @param p1 various bitstuffed elements
|
||||
* - p1 = (bit 0 - 15) - Unique ID to use for this question.
|
||||
* - p1 = (bit 16 - 31) - Company or client for which this question is.
|
||||
* @param p2 various bitstuffed elements
|
||||
* - p2 = (bit 0 - 17) - Buttons of the question.
|
||||
* - p2 = (bit 29 - 30) - Question type.
|
||||
* - p2 = (bit 31) - Question target: 0 - company, 1 - client.
|
||||
* @param p3 various bitstuffed elements
|
||||
* - p3 = (bit 0 - 31) - Company or client for which this question is.
|
||||
* @param text Text of the question.
|
||||
* @return the cost of this operation or an error
|
||||
*/
|
||||
CommandCost CmdGoalQuestion(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
CommandCost CmdGoalQuestion(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, uint64 p3, const char *text, const CommandAuxiliaryBase *aux_data)
|
||||
{
|
||||
uint16 uniqueid = (uint16)GB(p1, 0, 16);
|
||||
CompanyID company = (CompanyID)GB(p1, 16, 8);
|
||||
ClientID client = (ClientID)GB(p1, 16, 16);
|
||||
CompanyID company = (CompanyID)GB(p3, 0, 32);
|
||||
ClientID client = (ClientID)GB(p3, 0, 32);
|
||||
|
||||
static_assert(sizeof(uint32) >= sizeof(CompanyID));
|
||||
static_assert(sizeof(uint32) >= sizeof(ClientID));
|
||||
|
||||
static_assert(GOAL_QUESTION_BUTTON_COUNT < 29);
|
||||
uint32 button_mask = GB(p2, 0, GOAL_QUESTION_BUTTON_COUNT);
|
||||
|
Reference in New Issue
Block a user