author | rubidium |
Thu, 01 Feb 2007 15:49:12 +0000 | |
changeset 5893 | 7e431a4abebb |
parent 5584 | 1111b4d36e35 |
child 6123 | 04eb770ec17e |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
3 |
#include "stdafx.h" |
1891
862800791170
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents:
1568
diff
changeset
|
4 |
#include "openttd.h" |
2762 | 5 |
#include "callback_table.h" |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
6 |
#include "functions.h" |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
7 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
8 |
// If you add a callback for DoCommandP, also add the callback in here |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
9 |
// see below for the full list! |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
10 |
// If you don't do it, it won't work across the network!! |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
11 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
12 |
/* aircraft_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
13 |
CommandCallback CcBuildAircraft; |
2244 | 14 |
CommandCallback CcCloneAircraft; |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
15 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
16 |
/* airport_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
17 |
CommandCallback CcBuildAirport; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
18 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
19 |
/* bridge_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
20 |
CommandCallback CcBuildBridge; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
21 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
22 |
/* dock_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
23 |
CommandCallback CcBuildDocks; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
24 |
CommandCallback CcBuildCanal; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
25 |
|
4689
9a478541aec8
(svn r6594) - Fix (r6513): When adding command callbacks, add the callback to the list...
peter1138
parents:
3946
diff
changeset
|
26 |
/* depot_gui.c */ |
9a478541aec8
(svn r6594) - Fix (r6513): When adding command callbacks, add the callback to the list...
peter1138
parents:
3946
diff
changeset
|
27 |
CommandCallback CcCloneVehicle; |
9a478541aec8
(svn r6594) - Fix (r6513): When adding command callbacks, add the callback to the list...
peter1138
parents:
3946
diff
changeset
|
28 |
|
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
29 |
/* main_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
30 |
CommandCallback CcPlaySound10; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
31 |
CommandCallback CcPlaceSign; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
32 |
CommandCallback CcTerraform; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
33 |
CommandCallback CcBuildTown; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
34 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
35 |
/* rail_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
36 |
CommandCallback CcPlaySound1E; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
37 |
CommandCallback CcRailDepot; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
38 |
CommandCallback CcStation; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
39 |
CommandCallback CcBuildRailTunnel; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
40 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
41 |
/* road_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
42 |
CommandCallback CcPlaySound1D; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
43 |
CommandCallback CcBuildRoadTunnel; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
44 |
CommandCallback CcRoadDepot; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
45 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
46 |
/* roadveh_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
47 |
CommandCallback CcBuildRoadVeh; |
2244 | 48 |
CommandCallback CcCloneRoadVeh; |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
49 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
50 |
/* ship_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
51 |
CommandCallback CcBuildShip; |
2244 | 52 |
CommandCallback CcCloneShip; |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
53 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
54 |
/* train_gui.c */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
55 |
CommandCallback CcBuildWagon; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
56 |
CommandCallback CcBuildLoco; |
2244 | 57 |
CommandCallback CcCloneTrain; |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
58 |
|
3946
3c8c78208dbb
(svn r5092) -Fix: There was a gross race condition in the AI code which made it pretty random if the AI could give a new vehicle its orders
tron
parents:
2762
diff
changeset
|
59 |
CommandCallback CcAI; |
3c8c78208dbb
(svn r5092) -Fix: There was a gross race condition in the AI code which made it pretty random if the AI could give a new vehicle its orders
tron
parents:
2762
diff
changeset
|
60 |
|
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
61 |
CommandCallback *_callback_table[] = { |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
62 |
/* 0x00 */ NULL, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
63 |
/* 0x01 */ CcBuildAircraft, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
64 |
/* 0x02 */ CcBuildAirport, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
65 |
/* 0x03 */ CcBuildBridge, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
66 |
/* 0x04 */ CcBuildCanal, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
67 |
/* 0x05 */ CcBuildDocks, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
68 |
/* 0x06 */ CcBuildLoco, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
69 |
/* 0x07 */ CcBuildRoadVeh, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
70 |
/* 0x08 */ CcBuildShip, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
71 |
/* 0x09 */ CcBuildTown, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
72 |
/* 0x0A */ CcBuildRoadTunnel, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
73 |
/* 0x0B */ CcBuildRailTunnel, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
74 |
/* 0x0C */ CcBuildWagon, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
75 |
/* 0x0D */ CcRoadDepot, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
76 |
/* 0x0E */ CcRailDepot, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
77 |
/* 0x0F */ CcPlaceSign, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
78 |
/* 0x10 */ CcPlaySound10, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
79 |
/* 0x11 */ CcPlaySound1D, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
80 |
/* 0x12 */ CcPlaySound1E, |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
81 |
/* 0x13 */ CcStation, |
2244 | 82 |
/* 0x14 */ CcTerraform, |
83 |
/* 0x15 */ CcCloneAircraft, |
|
84 |
/* 0x16 */ CcCloneRoadVeh, |
|
85 |
/* 0x17 */ CcCloneShip, |
|
86 |
/* 0x18 */ CcCloneTrain, |
|
4689
9a478541aec8
(svn r6594) - Fix (r6513): When adding command callbacks, add the callback to the list...
peter1138
parents:
3946
diff
changeset
|
87 |
/* 0x19 */ CcAI, |
9a478541aec8
(svn r6594) - Fix (r6513): When adding command callbacks, add the callback to the list...
peter1138
parents:
3946
diff
changeset
|
88 |
/* 0x1A */ CcCloneVehicle |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
89 |
}; |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
90 |
|
1568
3bfd488306ba
(svn r2072) Use lengthof() instead of a home brewed version
tron
parents:
543
diff
changeset
|
91 |
const int _callback_table_count = lengthof(_callback_table); |