author | rubidium |
Fri, 08 Jun 2007 18:59:29 +0000 | |
changeset 6832 | fec0caeac27d |
parent 6794 | feec0fe8e824 |
child 6943 | 1914f26aee04 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
3 |
/** @file command.h */ |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
4 |
|
0 | 5 |
#ifndef COMMAND_H |
6 |
#define COMMAND_H |
|
7 |
||
8 |
enum { |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
9 |
CMD_BUILD_RAILROAD_TRACK = 0, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
10 |
CMD_REMOVE_RAILROAD_TRACK = 1, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
11 |
CMD_BUILD_SINGLE_RAIL = 2, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
12 |
CMD_REMOVE_SINGLE_RAIL = 3, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
13 |
CMD_LANDSCAPE_CLEAR = 4, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
14 |
CMD_BUILD_BRIDGE = 5, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
15 |
CMD_BUILD_RAILROAD_STATION = 6, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
16 |
CMD_BUILD_TRAIN_DEPOT = 7, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
17 |
CMD_BUILD_SIGNALS = 8, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
18 |
CMD_REMOVE_SIGNALS = 9, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
19 |
CMD_TERRAFORM_LAND = 10, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
20 |
CMD_PURCHASE_LAND_AREA = 11, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
21 |
CMD_SELL_LAND_AREA = 12, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
22 |
CMD_BUILD_TUNNEL = 13, |
0 | 23 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
24 |
CMD_REMOVE_FROM_RAILROAD_STATION = 14, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
25 |
CMD_CONVERT_RAIL = 15, |
0 | 26 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
27 |
CMD_BUILD_TRAIN_WAYPOINT = 16, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
28 |
CMD_RENAME_WAYPOINT = 17, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
29 |
CMD_REMOVE_TRAIN_WAYPOINT = 18, |
0 | 30 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
31 |
CMD_BUILD_ROAD_STOP = 21, |
6012
065d7234a7a9
(svn r8735) -Feature: drive-through road stops made possible by the hard work of mart3p.
rubidium
parents:
5475
diff
changeset
|
32 |
CMD_REMOVE_ROAD_STOP = 22, |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
33 |
CMD_BUILD_LONG_ROAD = 23, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
34 |
CMD_REMOVE_LONG_ROAD = 24, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
35 |
CMD_BUILD_ROAD = 25, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
36 |
CMD_REMOVE_ROAD = 26, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
37 |
CMD_BUILD_ROAD_DEPOT = 27, |
0 | 38 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
39 |
CMD_BUILD_AIRPORT = 29, |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
147
diff
changeset
|
40 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
41 |
CMD_BUILD_DOCK = 30, |
0 | 42 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
43 |
CMD_BUILD_SHIP_DEPOT = 31, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
44 |
CMD_BUILD_BUOY = 32, |
1227
1d940a5e02d2
(svn r1731) - Fix: [ 1106930 ] BugFix: placing signals with 2x1 drags workaround is completely rewritten. Also features checks for hacked/modified clients. Thanks a lot Hackykid!
darkvater
parents:
1217
diff
changeset
|
45 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
46 |
CMD_PLANT_TREE = 33, |
2244 | 47 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
48 |
CMD_BUILD_RAIL_VEHICLE = 34, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
49 |
CMD_MOVE_RAIL_VEHICLE = 35, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
50 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
51 |
CMD_START_STOP_TRAIN = 36, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
52 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
53 |
CMD_SELL_RAIL_WAGON = 38, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
54 |
|
4495
b6381e4bcb61
(svn r6280) -Codechange: Use the same naming for trains as for other vehicles:
Darkvater
parents:
4344
diff
changeset
|
55 |
CMD_SEND_TRAIN_TO_DEPOT = 39, |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
56 |
CMD_FORCE_TRAIN_PROCEED = 40, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
57 |
CMD_REVERSE_TRAIN_DIRECTION = 41, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
58 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
59 |
CMD_MODIFY_ORDER = 42, |
6794
feec0fe8e824
(svn r10033) -Feature [FS#760]: skip to the selected order in the order list when clicking on the "skip" button while pressing CTRL.
rubidium
parents:
6667
diff
changeset
|
60 |
CMD_SKIP_TO_ORDER = 43, |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
61 |
CMD_DELETE_ORDER = 44, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
62 |
CMD_INSERT_ORDER = 45, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
63 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
64 |
CMD_CHANGE_SERVICE_INT = 46, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
65 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
66 |
CMD_BUILD_INDUSTRY = 47, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
67 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
68 |
CMD_BUILD_COMPANY_HQ = 48, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
69 |
CMD_SET_PLAYER_FACE = 49, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
70 |
CMD_SET_PLAYER_COLOR = 50, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
71 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
72 |
CMD_INCREASE_LOAN = 51, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
73 |
CMD_DECREASE_LOAN = 52, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
74 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
75 |
CMD_WANT_ENGINE_PREVIEW = 53, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
76 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
77 |
CMD_NAME_VEHICLE = 54, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
78 |
CMD_RENAME_ENGINE = 55, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
79 |
CMD_CHANGE_COMPANY_NAME = 56, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
80 |
CMD_CHANGE_PRESIDENT_NAME = 57, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
81 |
CMD_RENAME_STATION = 58, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
82 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
83 |
CMD_SELL_AIRCRAFT = 59, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
84 |
CMD_START_STOP_AIRCRAFT = 60, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
85 |
CMD_BUILD_AIRCRAFT = 61, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
86 |
CMD_SEND_AIRCRAFT_TO_HANGAR = 62, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
87 |
CMD_REFIT_AIRCRAFT = 64, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
88 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
89 |
CMD_PLACE_SIGN = 65, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
90 |
CMD_RENAME_SIGN = 66, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
91 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
92 |
CMD_BUILD_ROAD_VEH = 67, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
93 |
CMD_START_STOP_ROADVEH = 68, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
94 |
CMD_SELL_ROAD_VEH = 69, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
95 |
CMD_SEND_ROADVEH_TO_DEPOT = 70, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
96 |
CMD_TURN_ROADVEH = 71, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
97 |
CMD_REFIT_ROAD_VEH = 72, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
98 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
99 |
CMD_PAUSE = 73, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
100 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
101 |
CMD_BUY_SHARE_IN_COMPANY = 74, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
102 |
CMD_SELL_SHARE_IN_COMPANY = 75, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
103 |
CMD_BUY_COMPANY = 76, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
104 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
105 |
CMD_BUILD_TOWN = 77, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
106 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
107 |
CMD_RENAME_TOWN = 80, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
108 |
CMD_DO_TOWN_ACTION = 81, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
109 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
110 |
CMD_SET_ROAD_DRIVE_SIDE = 82, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
111 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
112 |
CMD_CHANGE_DIFFICULTY_LEVEL = 85, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
113 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
114 |
CMD_START_STOP_SHIP = 86, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
115 |
CMD_SELL_SHIP = 87, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
116 |
CMD_BUILD_SHIP = 88, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
117 |
CMD_SEND_SHIP_TO_DEPOT = 89, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
118 |
CMD_REFIT_SHIP = 91, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
119 |
|
4712
4335ad42e163
(svn r6624) -Feature: added ability to add refit commands to vehicle orders (can only be done in goto depot orders)
bjarni
parents:
4662
diff
changeset
|
120 |
CMD_ORDER_REFIT = 98, |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
121 |
CMD_CLONE_ORDER = 99, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
122 |
CMD_CLEAR_AREA = 100, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
123 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
124 |
CMD_MONEY_CHEAT = 102, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
125 |
CMD_BUILD_CANAL = 103, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
126 |
|
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
127 |
CMD_PLAYER_CTRL = 104, ///< used in multiplayer to create a new player etc. |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
128 |
CMD_LEVEL_LAND = 105, ///< level land |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
129 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
130 |
CMD_REFIT_RAIL_VEHICLE = 106, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
131 |
CMD_RESTORE_ORDER_INDEX = 107, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
132 |
CMD_BUILD_LOCK = 108, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
133 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
134 |
CMD_BUILD_SIGNAL_TRACK = 110, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
135 |
CMD_REMOVE_SIGNAL_TRACK = 111, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
136 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
137 |
CMD_GIVE_MONEY = 113, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
138 |
CMD_CHANGE_PATCH_SETTING = 114, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
139 |
|
4661
89c3cbba9846
(svn r6544) - Codechange: Rename CmdReplaceVehicle to CmdSetAutoReplace, to reflect what it does.
peter1138
parents:
4659
diff
changeset
|
140 |
CMD_SET_AUTOREPLACE = 115, |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
141 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
142 |
CMD_CLONE_VEHICLE = 116, |
4640
4e380e2ecfa7
(svn r6515) -Feature: added "start all" and "stop all" buttons to the depot windows
bjarni
parents:
4495
diff
changeset
|
143 |
CMD_MASS_START_STOP = 117, |
4659
e476c76389a8
(svn r6542) -Feature: [depot window] added a "sell all vehicles in depot" button
bjarni
parents:
4640
diff
changeset
|
144 |
CMD_DEPOT_SELL_ALL_VEHICLES = 118, |
4662
e36935c7bdde
(svn r6552) -Feature: [depot window] added a "autoreplace all vehicles in depot" button
bjarni
parents:
4661
diff
changeset
|
145 |
CMD_DEPOT_MASS_AUTOREPLACE = 119, |
6832
fec0caeac27d
(svn r10071) -Feature [FS#828]: moving of orders (skidd13).
rubidium
parents:
6794
diff
changeset
|
146 |
|
6643
f81bee57bc09
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents:
6491
diff
changeset
|
147 |
CMD_CREATE_GROUP = 120, |
f81bee57bc09
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents:
6491
diff
changeset
|
148 |
CMD_DELETE_GROUP = 121, |
f81bee57bc09
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents:
6491
diff
changeset
|
149 |
CMD_RENAME_GROUP = 122, |
f81bee57bc09
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents:
6491
diff
changeset
|
150 |
CMD_ADD_VEHICLE_GROUP = 123, |
f81bee57bc09
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents:
6491
diff
changeset
|
151 |
CMD_ADD_SHARED_VEHICLE_GROUP = 124, |
f81bee57bc09
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
rubidium
parents:
6491
diff
changeset
|
152 |
CMD_REMOVE_ALL_VEHICLES_GROUP = 125, |
6667 | 153 |
CMD_SET_GROUP_REPLACE_PROTECTION = 126, |
6832
fec0caeac27d
(svn r10071) -Feature [FS#828]: moving of orders (skidd13).
rubidium
parents:
6794
diff
changeset
|
154 |
|
fec0caeac27d
(svn r10071) -Feature [FS#828]: moving of orders (skidd13).
rubidium
parents:
6794
diff
changeset
|
155 |
CMD_MOVE_ORDER = 127, |
0 | 156 |
}; |
157 |
||
158 |
enum { |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
159 |
DC_EXEC = 0x01, |
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
160 |
DC_AUTO = 0x02, ///< don't allow building on structures |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
161 |
DC_QUERY_COST = 0x04, ///< query cost only, don't build. |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
162 |
DC_NO_WATER = 0x08, ///< don't allow building on water |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
163 |
DC_NO_RAIL_OVERLAP = 0x10, ///< don't allow overlap of rails (used in buildrail) |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
164 |
DC_AI_BUILDING = 0x20, ///< special building rules for AI |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
165 |
DC_NO_TOWN_RATING = 0x40, ///< town rating does not disallow you from building |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
166 |
DC_FORCETEST = 0x80, ///< force test too. |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
147
diff
changeset
|
167 |
|
0 | 168 |
CMD_ERROR = ((int32)0x80000000), |
169 |
}; |
|
170 |
||
6491
00dc414c909d
(svn r9672) -Cleanup: lots of coding style fixes around operands.
rubidium
parents:
6248
diff
changeset
|
171 |
#define CMD_MSG(x) ((x) << 16) |
0 | 172 |
|
173 |
enum { |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
174 |
CMD_AUTO = 0x0200, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
175 |
CMD_NO_WATER = 0x0400, |
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
176 |
CMD_NETWORK_COMMAND = 0x0800, ///< execute the command without sending it on the network |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
177 |
CMD_NO_TEST_IF_IN_NETWORK = 0x1000, ///< When enabled, the command will bypass the no-DC_EXEC round if in network |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
3990
diff
changeset
|
178 |
CMD_SHOW_NO_ERROR = 0x2000, |
0 | 179 |
}; |
180 |
||
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
181 |
/** Command flags for the command table _command_proc_table */ |
1804
fbe724472bb4
(svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents:
1796
diff
changeset
|
182 |
enum { |
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
183 |
CMD_SERVER = 0x1, ///< the command can only be initiated by the server |
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
184 |
CMD_OFFLINE = 0x2, ///< the command cannot be executed in a multiplayer game; single-player only |
1804
fbe724472bb4
(svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents:
1796
diff
changeset
|
185 |
}; |
fbe724472bb4
(svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents:
1796
diff
changeset
|
186 |
|
3491
35d747bb5e82
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
tron
parents:
2819
diff
changeset
|
187 |
typedef int32 CommandProc(TileIndex tile, uint32 flags, uint32 p1, uint32 p2); |
35d747bb5e82
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
tron
parents:
2819
diff
changeset
|
188 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6247
diff
changeset
|
189 |
struct Command { |
1804
fbe724472bb4
(svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents:
1796
diff
changeset
|
190 |
CommandProc *proc; |
fbe724472bb4
(svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents:
1796
diff
changeset
|
191 |
byte flags; |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6247
diff
changeset
|
192 |
}; |
1804
fbe724472bb4
(svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents:
1796
diff
changeset
|
193 |
|
0 | 194 |
//#define return_cmd_error(errcode) do { _error_message=(errcode); return CMD_ERROR; } while(0) |
195 |
#define return_cmd_error(errcode) do { return CMD_ERROR | (errcode); } while (0) |
|
196 |
||
1713
659ca3025cc5
(svn r2217) - Fix: [ 1184201 ] AI orders its vehicles to a competitor's truck stop. Added a CmdFailed() check to all command returns of the AI instead of the simple == / != CMD_ERROR check. This should fix the problem.
Darkvater
parents:
1691
diff
changeset
|
197 |
/** |
659ca3025cc5
(svn r2217) - Fix: [ 1184201 ] AI orders its vehicles to a competitor's truck stop. Added a CmdFailed() check to all command returns of the AI instead of the simple == / != CMD_ERROR check. This should fix the problem.
Darkvater
parents:
1691
diff
changeset
|
198 |
* Check the return value of a DoCommand*() function |
659ca3025cc5
(svn r2217) - Fix: [ 1184201 ] AI orders its vehicles to a competitor's truck stop. Added a CmdFailed() check to all command returns of the AI instead of the simple == / != CMD_ERROR check. This should fix the problem.
Darkvater
parents:
1691
diff
changeset
|
199 |
* @param res the resulting value from the command to be checked |
659ca3025cc5
(svn r2217) - Fix: [ 1184201 ] AI orders its vehicles to a competitor's truck stop. Added a CmdFailed() check to all command returns of the AI instead of the simple == / != CMD_ERROR check. This should fix the problem.
Darkvater
parents:
1691
diff
changeset
|
200 |
* @return Return true if the command failed, false otherwise |
659ca3025cc5
(svn r2217) - Fix: [ 1184201 ] AI orders its vehicles to a competitor's truck stop. Added a CmdFailed() check to all command returns of the AI instead of the simple == / != CMD_ERROR check. This should fix the problem.
Darkvater
parents:
1691
diff
changeset
|
201 |
*/ |
1691
852ca27d6eef
(svn r2195) Add CmdFailed() as the One True Way(tm) to check if a command failed.
tron
parents:
1623
diff
changeset
|
202 |
static inline bool CmdFailed(int32 res) |
852ca27d6eef
(svn r2195) Add CmdFailed() as the One True Way(tm) to check if a command failed.
tron
parents:
1623
diff
changeset
|
203 |
{ |
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
204 |
/* lower 16bits are the StringID of the possible error */ |
1691
852ca27d6eef
(svn r2195) Add CmdFailed() as the One True Way(tm) to check if a command failed.
tron
parents:
1623
diff
changeset
|
205 |
return res <= (CMD_ERROR | INVALID_STRING_ID); |
852ca27d6eef
(svn r2195) Add CmdFailed() as the One True Way(tm) to check if a command failed.
tron
parents:
1623
diff
changeset
|
206 |
} |
852ca27d6eef
(svn r2195) Add CmdFailed() as the One True Way(tm) to check if a command failed.
tron
parents:
1623
diff
changeset
|
207 |
|
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
208 |
/* command.cpp */ |
4828
4e6f53fa10cb
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents:
4712
diff
changeset
|
209 |
typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2); |
3491
35d747bb5e82
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
tron
parents:
2819
diff
changeset
|
210 |
int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc); |
4828
4e6f53fa10cb
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents:
4712
diff
changeset
|
211 |
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd); |
4e6f53fa10cb
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents:
4712
diff
changeset
|
212 |
|
4e6f53fa10cb
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents:
4712
diff
changeset
|
213 |
#ifdef ENABLE_NETWORK |
4e6f53fa10cb
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents:
4712
diff
changeset
|
214 |
|
4e6f53fa10cb
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents:
4712
diff
changeset
|
215 |
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback); |
4e6f53fa10cb
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
Darkvater
parents:
4712
diff
changeset
|
216 |
#endif /* ENABLE_NETWORK */ |
0 | 217 |
|
6123
04eb770ec17e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6012
diff
changeset
|
218 |
extern const char* _cmd_text; ///< Text, which gets sent with a command |
1820
d03c56850dc2
(svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes.
tron
parents:
1804
diff
changeset
|
219 |
|
959
e6a3bbda610f
(svn r1451) Fix some of the signed/unsigned comparison warnings
tron
parents:
903
diff
changeset
|
220 |
bool IsValidCommand(uint cmd); |
1804
fbe724472bb4
(svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
Darkvater
parents:
1796
diff
changeset
|
221 |
byte GetCommandFlags(uint cmd); |
6247 | 222 |
int32 GetAvailableMoneyForCommand(); |
0 | 223 |
|
224 |
#endif /* COMMAND_H */ |