summaryrefslogtreecommitdiff
path: root/src/story.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-10 02:08:52 +0200
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit7048e1522f7095e7c716c2488d78711ab6ed912c (patch)
treeef0336fbdbfa05cc7a4ca6c065885829abb50fda /src/story.cpp
parent33ca4f2b9950d98fed902962c847833667ccca9f (diff)
downloadopenttd-7048e1522f7095e7c716c2488d78711ab6ed912c.tar.xz
Codechange: Move flags in CommandProc in front of the command arguments.
Diffstat (limited to 'src/story.cpp')
-rw-r--r--src/story.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/story.cpp b/src/story.cpp
index 4c58b19a5..24b09ade5 100644
--- a/src/story.cpp
+++ b/src/story.cpp
@@ -197,15 +197,15 @@ bool StoryPageButtonData::ValidateVehicleType() const
/**
* Create a new story page.
- * @param tile unused.
* @param flags type of operation
+ * @param tile unused.
* @param p1 various bitstuffed elements
* - p1 = (bit 0 - 7) - Company for which this story page belongs to.
* @param p2 unused.
* @param text Title of the story page. Null is allowed in which case a generic page title is provided by OpenTTD.
* @return the cost of this operation or an error
*/
-CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdCreateStoryPage(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
if (!StoryPage::CanAllocateItem()) return CMD_ERROR;
@@ -242,8 +242,8 @@ CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u
/**
* Create a new story page element.
- * @param tile Tile location if it is a location page element, otherwise unused.
* @param flags type of operation
+ * @param tile Tile location if it is a location page element, otherwise unused.
* @param p1 various bitstuffed elements
* - p1 = (bit 0 - 15) - The page which the element belongs to.
* (bit 16 - 23) - Page element type
@@ -251,7 +251,7 @@ CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u
* @param text Text content in case it is a text or location page element
* @return the cost of this operation or an error
*/
-CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdCreateStoryPageElement(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
if (!StoryPageElement::CanAllocateItem()) return CMD_ERROR;
@@ -292,8 +292,8 @@ CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
/**
* Update a new story page element.
- * @param tile Tile location if it is a location page element, otherwise unused.
* @param flags type of operation
+ * @param tile Tile location if it is a location page element, otherwise unused.
* @param p1 various bitstuffed elements
* - p1 = (bit 0 - 15) - The page element to update.
* (bit 16 - 31) - unused
@@ -301,7 +301,7 @@ CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
* @param text Text content in case it is a text or location page element
* @return the cost of this operation or an error
*/
-CommandCost CmdUpdateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdUpdateStoryPageElement(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
StoryPageElementID page_element_id = (StoryPageElementID)GB(p1, 0, 16);
@@ -324,14 +324,14 @@ CommandCost CmdUpdateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
/**
* Update title of a story page.
- * @param tile unused.
* @param flags type of operation
+ * @param tile unused.
* @param p1 = (bit 0 - 15) - StoryPageID to update.
* @param p2 unused
* @param text title text of the story page.
* @return the cost of this operation or an error
*/
-CommandCost CmdSetStoryPageTitle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdSetStoryPageTitle(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageID page_id = (StoryPageID)GB(p1, 0, 16);
@@ -354,14 +354,14 @@ CommandCost CmdSetStoryPageTitle(TileIndex tile, DoCommandFlag flags, uint32 p1,
/**
* Update date of a story page.
- * @param tile unused.
* @param flags type of operation
+ * @param tile unused.
* @param p1 = (bit 0 - 15) - StoryPageID to update.
* @param p2 = (bit 0 - 31) - date
* @param text unused
* @return the cost of this operation or an error
*/
-CommandCost CmdSetStoryPageDate(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdSetStoryPageDate(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageID page_id = (StoryPageID)GB(p1, 0, 16);
@@ -381,14 +381,14 @@ CommandCost CmdSetStoryPageDate(TileIndex tile, DoCommandFlag flags, uint32 p1,
/**
* Display a story page for all clients that are allowed to
* view the story page.
- * @param tile unused.
* @param flags type of operation
+ * @param tile unused.
* @param p1 = (bit 0 - 15) - StoryPageID to show.
* @param p2 unused
* @param text unused
* @return the cost of this operation or an error
*/
-CommandCost CmdShowStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdShowStoryPage(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageID page_id = (StoryPageID)GB(p1, 0, 16);
@@ -403,14 +403,14 @@ CommandCost CmdShowStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
}
/**
* Remove a story page and associated story page elements.
- * @param tile unused.
* @param flags type of operation
+ * @param tile unused.
* @param p1 = (bit 0 - 15) - StoryPageID to remove.
* @param p2 unused.
* @param text unused.
* @return the cost of this operation or an error
*/
-CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdRemoveStoryPage(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageID page_id = (StoryPageID)p1;
@@ -436,14 +436,14 @@ CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u
/**
* Remove a story page element
- * @param tile unused.
* @param flags type of operation
+ * @param tile unused.
* @param p1 = (bit 0 - 15) - StoryPageElementID to remove.
* @param p2 unused.
* @param text unused.
* @return the cost of this operation or an error
*/
-CommandCost CmdRemoveStoryPageElement(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdRemoveStoryPageElement(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
if (_current_company != OWNER_DEITY) return CMD_ERROR;
StoryPageElementID page_element_id = (StoryPageElementID)p1;
@@ -463,14 +463,14 @@ CommandCost CmdRemoveStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
/**
* Clicked/used a button on a story page.
- * @param tile Tile selected, for tile selection buttons, otherwise unused.
* @param flags Type of operation.
+ * @param tile Tile selected, for tile selection buttons, otherwise unused.
* @param p1 Bit 0..15 = story page element id of button.
* @param p2 ID of selected item for buttons that select an item (e.g. vehicle), otherwise unused.
* @param text Unused.
* @return The cost of the operation, or an error.
*/
-CommandCost CmdStoryPageButton(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdStoryPageButton(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
StoryPageElementID page_element_id = (StoryPageElementID)GB(p1, 0, 16);