home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / kfuncs.c < prev    next >
Text File  |  1998-06-08  |  21KB  |  484 lines

  1. /*
  2.  * $Source: f:/miner/source/main/editor/rcs/kfuncs.c $
  3.  * $Revision: 2.1 $
  4.  * $Author: yuan $
  5.  * $Date: 1995/03/08 16:07:23 $
  6.  * 
  7.  * .
  8.  * 
  9.  * $Log: kfuncs.c $
  10.  * Revision 2.1  1995/03/08  16:07:23  yuan
  11.  * Added segment sizing default functions.
  12.  * 
  13.  * Revision 2.0  1995/02/27  11:34:45  john
  14.  * Version 2.0! No anonymous unions, Watcom 10.0, with no need
  15.  * for bitmaps.tbl.
  16.  * 
  17.  * Revision 1.112  1995/01/12  12:10:31  yuan
  18.  * Added coop object capability.
  19.  * 
  20.  * Revision 1.111  1994/11/27  23:17:16  matt
  21.  * Made changes for new mprintf calling convention
  22.  * 
  23.  * Revision 1.110  1994/11/23  12:17:22  mike
  24.  * bind retmap functions.
  25.  * 
  26.  * Revision 1.109  1994/11/19  15:20:54  mike
  27.  * rip out unused code and data.
  28.  * 
  29.  * Revision 1.108  1994/11/17  11:39:02  matt
  30.  * Ripped out code to load old mines
  31.  * 
  32.  * Revision 1.107  1994/10/27  10:06:12  mike
  33.  * kill macro stuff.
  34.  * 
  35.  * Revision 1.106  1994/10/18  15:31:43  mike
  36.  * Bind mine correction function to test keypad, key=1.
  37.  * 
  38.  * Revision 1.105  1994/09/26  23:22:06  matt
  39.  * Added functions to keep player's starting position from getting messed up
  40.  * 
  41.  * Revision 1.104  1994/09/24  14:15:41  mike
  42.  * Custom colored object support.
  43.  * 
  44.  * Revision 1.103  1994/09/23  18:03:54  yuan
  45.  * Finished wall checking code.
  46.  * 
  47.  * Revision 1.102  1994/09/22  19:03:52  mike
  48.  * Test function test_shortpos on ctrl-keypad3
  49.  * 
  50.  * Revision 1.101  1994/09/20  14:35:56  mike
  51.  * Bind functions to keypad 2, 3.
  52.  * 
  53.  * Revision 1.100  1994/09/15  22:58:10  matt
  54.  * Made new objects be oriented to their segment
  55.  * Added keypad function to flip an object upside-down
  56.  * 
  57.  * Revision 1.99  1994/09/14  16:50:50  yuan
  58.  * Added load mine only function
  59.  * 
  60.  * Revision 1.98  1994/08/25  21:57:52  mike
  61.  * IS_CHILD stuff.
  62.  * 
  63.  * Revision 1.97  1994/08/16  18:10:52  yuan
  64.  * Maded C place you in the center of a segment.
  65.  * 
  66.  * Revision 1.96  1994/08/15  17:48:01  yuan
  67.  * Added external walls.
  68.  * 
  69.  * Revision 1.95  1994/08/13  17:32:38  mike
  70.  * test function.
  71.  * 
  72.  * Revision 1.94  1994/08/05  21:17:57  matt
  73.  * Allow two doors to be linked together
  74.  * 
  75.  * Revision 1.93  1994/08/05  18:18:52  matt
  76.  * Made object rotation have 4x resolution, and SHIFT+rotate do old resolution.
  77.  * 
  78.  * Revision 1.92  1994/08/03  10:31:06  mike
  79.  * Add texture map propagation without uv assignment.
  80.  * 
  81.  * Revision 1.91  1994/08/02  14:17:00  mike
  82.  * Clean up dialog boxes, add one for Matt.
  83.  * 
  84.  * Revision 1.90  1994/07/30  17:04:47  mike
  85.  * Bind key for max_depth on path testing.
  86.  * 
  87.  */
  88.  
  89.  
  90. #pragma off (unreferenced)
  91. static char rcsid[] = "$Id: kfuncs.c 2.1 1995/03/08 16:07:23 yuan Exp $";
  92. #pragma on (unreferenced)
  93.  
  94. #include <stdlib.h>
  95.  
  96. #include "inferno.h"
  97. #include "func.h"
  98. #include "kdefs.h"
  99. #include "segment.h"
  100. #include "editor.h"
  101. #include "error.h"
  102. #include "slew.h"
  103. #include "mono.h"
  104. #include "gamesave.h"
  105. #include "eobject.h"
  106. #include "medwall.h"
  107.  
  108. // Test function prototypes (replace Test1, 2 and 3 with whatever function 
  109. //                                        you wish to test.)
  110. extern void test_create_path();
  111. extern void test_create_all_paths();
  112. extern void test_create_path_many();
  113. extern void create_all_paths();
  114. extern void test_create_all_anchors();
  115. // extern void make_curside_bottom_side();
  116. extern void move_object_to_mouse_click();
  117. extern void test_create_n_segment_path();
  118.  
  119. extern void set_all_modes_to_hover(void);
  120.  
  121. int Test1() 
  122. {
  123. //    { int i;
  124. //        for (i=Highest_segment_index+1; i<MAX_SEGMENTS; i++)
  125. //            Segments[i].segnum = -1;
  126. //    }
  127.  
  128.     mprintf((0, "Initializing replacement list.\n"));
  129.     init_replacements();
  130.  
  131.     return 0;
  132. }
  133.  
  134. extern void check_for_overlapping_segments(void);
  135. extern void init_replacements();
  136. int Test2() 
  137. {
  138. //    mprintf((0, "\nCalling check_for_overlapping_segments.\n"));
  139. //    check_for_overlapping_segments();
  140.  
  141.     mprintf((0, "Going to do texture replacements.\n"));
  142.     do_replacements();
  143.  
  144.     return 0;
  145. }
  146.  
  147. //extern fix fcd_test(void);
  148. //extern void test_shortpos(void);
  149.  
  150. extern void do_replacements(void);
  151. extern void do_replacements_all(void);
  152.  
  153. int Test3() 
  154. {
  155.     Int3();    //    Are you sure you want to do this?
  156.     //    This will replace all textures in your replacement list
  157.     //    in all mines.
  158.     //    If you don't want to do this, set eip to the return statement
  159.     //    and continue.
  160.  
  161.     mprintf((0, "Going to do texture replacements.\n"));
  162.     do_replacements_all();
  163.  
  164.     return 0;
  165. }
  166.  
  167. FUNCTION med_functions[] = {
  168.  
  169. // Test functions
  170. {   "med-test-1",                         0,    Test1 },
  171. {   "med-test-2",                         0,    Test2 },
  172. {   "med-test-3",                         0,    Test3 },
  173.  
  174. // In khelp.c
  175. {   "med-help",                         0,      DoHelp },
  176.  
  177. // In kcurve.c
  178. {   "med-curve-init",                   0,      InitCurve },
  179. {   "med-curve-generate",               0,      GenerateCurve },
  180. {   "med-curve-decrease-r4",            0,      DecreaseR4 },
  181. {   "med-curve-increase-r4",            0,      IncreaseR4 },
  182. {   "med-curve-decrease-r1",            0,      DecreaseR1 },
  183. {   "med-curve-increase-r1",            0,      IncreaseR1 },
  184. {   "med-curve-delete",                 0,      DeleteCurve },
  185. {   "med-curve-set",                    0,      SetCurve },
  186.  
  187. // In kmine.c
  188. {   "med-mine-save",                    0,      SaveMine },
  189. //{   "med-mine-load",                    0,      LoadMine },
  190. {   "med-mine-menu",                    0,      MineMenu },
  191. {   "med-mine-create-new",              0,      CreateNewMine },
  192. //{     "med-mine-load-old",                     0,        LoadOldMine },            
  193. {   "med-situation-save",               0,      SaveSituation },
  194. {   "med-situation-load",               0,      LoadSituation },
  195. {     "med-restore-game-state",                 0,        RestoreGameState },
  196. //{   "load-mine-only",                    0,      LoadMineOnly   },
  197.  
  198. // In kgame.c
  199. {   "med-game-save",                    0,      SaveGameData },
  200. {   "med-game-load",                    0,      LoadGameData },
  201.  
  202. // In kview.c
  203. {   "med-view-zoom-out",                0,      ZoomOut },
  204. {   "med-view-zoom-in",                 0,      ZoomIn },
  205. {   "med-view-move-away",               0,      MoveAway },
  206. {   "med-view-move-closer",             0,      MoveCloser },
  207. {   "med-view-toggle-chase",            0,      ToggleChaseMode },
  208.  
  209. // In kbuild.c
  210. {   "med-build-bridge",                 0,      CreateBridge },
  211. {   "med-build-joint",                  0,      FormJoint },
  212. {   "med-build-adj-joint",              0,      CreateAdjacentJoint },
  213. {   "med-build-sloppy-adj-joint",       0,      CreateSloppyAdjacentJoint },
  214. {   "med-build-sloppy-adj-joint-group", 0,      CreateSloppyAdjacentJointsGroup },
  215. {   "med-build-adj-joints-segment",     0,      CreateAdjacentJointsSegment },
  216. {   "med-build-adj-joints-all",         0,      CreateAdjacentJointsAll },
  217.  
  218. // In segment.c
  219. {   "med-segment-bottom",                  0,      ToggleBottom }, //make_curside_bottom_side },
  220. {   "med-segment-show-bottom",          0,      ToggleBottom },
  221.  
  222. // In ksegmove.c
  223. {   "med-segmove-decrease-heading",     0,      DecreaseHeading },
  224. {   "med-segmove-increase-heading",     0,      IncreaseHeading },
  225. {   "med-segmove-decrease-pitch",       0,      DecreasePitch },
  226. {   "med-segmove-increase-pitch",       0,      IncreasePitch },
  227. {   "med-segmove-decrease-bank",        0,      DecreaseBank },
  228. {   "med-segmove-increase-bank",        0,      IncreaseBank },
  229.  
  230. // In ksegsel.c
  231. {   "med-segsel-next-segment",          0,      SelectCurrentSegForward },
  232. {   "med-segsel-prev-segment",          0,      SelectCurrentSegBackward },
  233. {   "med-segsel-next-side",             0,      SelectNextSide },
  234. {   "med-segsel-prev-side",             0,      SelectPrevSide },
  235. {   "med-segsel-set-marked",            0,      CopySegToMarked },
  236. {   "med-segsel-bottom",                0,      SelectBottom },
  237. {   "med-segsel-front",                 0,      SelectFront },
  238. {   "med-segsel-top",                   0,      SelectTop },
  239. {   "med-segsel-back",                  0,      SelectBack },
  240. {   "med-segsel-left",                  0,      SelectLeft },
  241. {   "med-segsel-right",                 0,      SelectRight },
  242.  
  243. // In ksegsize.c
  244. {   "med-segsize-increase-length",      0,      IncreaseSegLength },
  245. {   "med-segsize-decrease-length",      0,      DecreaseSegLength },
  246. {   "med-segsize-decrease-width",       0,      DecreaseSegWidth },
  247. {   "med-segsize-increase-width",       0,      IncreaseSegWidth },
  248. {   "med-segsize-increase-height",      0,      IncreaseSegHeight },
  249. {   "med-segsize-decrease-height",      0,      DecreaseSegHeight },
  250.  
  251. {   "med-segsize-increase-length-big",  0,      IncreaseSegLengthBig },
  252. {   "med-segsize-decrease-length-big",  0,      DecreaseSegLengthBig },
  253. {   "med-segsize-decrease-width-big",   0,      DecreaseSegWidthBig },
  254. {   "med-segsize-increase-width-big",   0,      IncreaseSegWidthBig },
  255. {   "med-segsize-increase-height-big",  0,      IncreaseSegHeightBig },
  256. {   "med-segsize-decrease-height-big",  0,      DecreaseSegHeightBig },
  257. {   "med-segsize-toggle-mode",               0,      ToggleSegSizeMode },
  258. {   "med-segsize-perturb-curside",         0,      PerturbCurside },
  259. {   "med-segsize-perturb-curside-big",     0,      PerturbCursideBig },
  260. {   "med-segsize-increase-length-default",  0,  IncreaseSegLengthDefault },
  261. {   "med-segsize-decrease-length-default",  0,  DecreaseSegLengthDefault },
  262. {   "med-segsize-increase-width-default",  0,   IncreaseSegWidthDefault },
  263. {   "med-segsize-decrease-width-default",  0,   DecreaseSegWidthDefault },
  264. {   "med-segsize-increase-height-default",  0,   IncreaseSegHeightDefault },
  265. {   "med-segsize-decrease-height-default",  0,   DecreaseSegHeightDefault },
  266.  
  267. //  In ktmap.c
  268. {   "med-tmap-assign",                  0,      AssignTexture },
  269. {   "med-tmap-assign2",                 0,      AssignTexture2 },
  270. {   "med-tmap-clear2",                  0,      ClearTexture2 },
  271. {   "med-tmap-propogate",               0,      PropagateTextures },
  272. {   "med-tmap-propogate-move",          0,      PropagateTexturesMove },
  273. {   "med-tmap-propogate-move-uvs",      0,      PropagateTexturesMoveUVs },
  274. {   "med-tmap-propogate-move-uvs",      0,      PropagateTexturesMoveUVs },
  275. {   "med-tmap-propogate-uvs",           0,      PropagateTexturesUVs },
  276. {   "med-tmap-propogate-selected",      0,      PropagateTexturesSelected },
  277.  
  278. //  In wall.c
  279. {   "med-wall-add-blastable",           0,      wall_add_blastable },
  280. {   "med-wall-add-door",                    0,      wall_add_door },
  281. {   "med-wall-add-closed",                  0,        wall_add_closed_wall },
  282. {   "med-wall-add-external",              0,        wall_add_external_wall },
  283. {   "med-wall-add-illusion",             0,      wall_add_illusion },
  284. {   "med-wall-restore-all",                 0,      wall_restore_all },
  285. {   "med-wall-remove",                     0,      wall_remove },
  286. {   "do-wall-dialog",                         0,      do_wall_dialog },
  287. {   "med-link-doors",                         0,        wall_link_doors },
  288. {   "med-unlink-door",                         0,        wall_unlink_door },
  289. {   "check-walls",                              0,        check_walls },
  290. {   "delete-all-walls",                         0,        delete_all_walls },
  291.  
  292. // In centers.c
  293. {   "do-centers-dialog",                         0,      do_centers_dialog },
  294.  
  295. //  In switch.c
  296. //{   "med-trigger-add-damage",           0,      trigger_add_damage },
  297. //{   "med-trigger-add-exit",              0,      trigger_add_exit },
  298. //{   "med-trigger-control",                  0,      trigger_control },
  299. //{   "med-trigger-remove",                  0,      trigger_remove },
  300. //{   "med-bind-wall-to-control",         0,      bind_wall_to_control_trigger },
  301. {   "do-trigger-dialog",                     0,      do_trigger_dialog },
  302.  
  303. //--//// In macro.c
  304. //--//{   "med-macro-menu",                   0,      MacroMenu },
  305. //--//{   "med-macro-play-fast",              0,      MacroPlayFast },
  306. //--//{   "med-macro-play-normal",            0,      MacroPlayNormal },
  307. //--//{   "med-macro-record-all",             0,      MacroRecordAll },
  308. //--//{   "med-macro-record-keys",            0,      MacroRecordKeys },
  309. //--//{   "med-macro-save",                   0,      MacroSave },
  310. //--//{   "med-macro-load",                   0,      MacroLoad },
  311.  
  312. // In editor.c
  313. {   "med-update",                       0,      medlisp_update_screen },
  314. {   "med-segment-add",                  0,      AttachSegment },
  315. {   "med-segment-delete",               0,      medlisp_delete_segment },
  316. {   "med-segment-scale",                3,      medlisp_scale_segment },
  317. {   "med-segment-rotate",               3,      medlisp_rotate_segment },
  318. {   "med-dos-shell",                    0,      DosShell },
  319. //{   "med-lisp-call",                    0,      CallLisp },
  320. {   "med-editor-exit",                  0,      ExitEditor },
  321. {   "med-segment-exchange",             0,      ExchangeMarkandCurseg },
  322. {   "med-segment-mark",                 0,      CopySegtoMarked },
  323. {     "med-about",                                 0,      ShowAbout },
  324. {     "med-mark-start",                         0,        MarkStart },
  325. {     "med-mark-end",                              0,        MarkEnd },
  326.  
  327. //    In group.c
  328. {     "med-group-load",                         0,         LoadGroup },
  329. {     "med-group-save",                         0,         SaveGroup },
  330. {   "med-move-group",                   0,      MoveGroup },
  331. {   "med-copy-group",                   0,      CopyGroup },
  332. {     "med-rotate-group",                         0,        RotateGroup },
  333. {   "med-segment-add-new",              0,      AttachSegmentNew },
  334. {     "med-mark-groupseg",                     0,        MarkGroupSegment },
  335. {     "med-next-group",                         0,        NextGroup },
  336. {     "med-prev-group",                         0,        PrevGroup },
  337. {     "med-delete-group",                         0,      DeleteGroup },
  338. {     "med-create-group",                         0,        CreateGroup },
  339. {     "med-ungroup-segment",                     0,        UngroupSegment },
  340. {     "med-group-segment",                     0,        GroupSegment },
  341. {     "med-degroup-group",                     0,        Degroup },
  342. {     "med-subtract-from-group",             0,        SubtractFromGroup },
  343.  
  344. //  In autosave.c
  345. {   "med-autosave-undo",                0,      UndoCommand },
  346. {     "med-autosave-toggle",                     0,        ToggleAutosave },
  347.  
  348. //    In texture.c
  349. {    "med-tass-flip-x",                         0,    TexFlipX },
  350. {    "med-tass-flip-y",                         0,    TexFlipY },
  351. {    "med-tass-slide-up",                         0,    TexSlideUp },
  352. {    "med-tass-slide-left",                     0,    TexSlideLeft },
  353. {    "med-tass-set-default",                     0,    TexSetDefault },
  354. {    "med-tass-slide-right",                     0,    TexSlideRight },
  355. {    "med-tass-rotate-left",                     0,    TexRotateLeft },
  356. {    "med-tass-slide-down",                     0,    TexSlideDown },
  357. {    "med-tass-stretch-down",                 0,    TexStretchDown },
  358. {    "med-tass-stretch-up",                     0,    TexStretchUp },
  359. {    "med-tass-rotate-right",                 0,    TexRotateRight },
  360. {    "med-tass-select-active-edge",         0,    TexSelectActiveEdge },
  361. {    "med-tass-rotate-90-degrees",             0,    TexRotate90Degrees },
  362. {  "med-tass-increase-tiling",          0,   TexIncreaseTiling },
  363. {  "med-tass-decrease-tiling",          0,   TexDecreaseTiling },
  364. {    "med-tass-slide-up-big",                 0,    TexSlideUpBig },
  365. {    "med-tass-slide-left-big",                 0,    TexSlideLeftBig },
  366. {    "med-tass-slide-right-big",             0,    TexSlideRightBig },
  367. {    "med-tass-rotate-left-big",             0,    TexRotateLeftBig },
  368. {    "med-tass-slide-down-big",                 0,    TexSlideDownBig },
  369. {    "med-tass-rotate-right-big",             0,    TexRotateRightBig },
  370.  
  371. //    In eobject.c
  372. {    "med-obj-set-player",                     0,    SetPlayerPosition },
  373. {    "med-obj-place-object",                     0,    ObjectPlaceObject },
  374. {    "med-obj-place-object-tmap",             0,    ObjectPlaceObjectTmap },
  375. {    "med-obj-move-nearer",                     0,    ObjectMoveNearer },
  376. {    "med-obj-move-further",                     0,    ObjectMoveFurther },
  377. {    "med-obj-delete-object",                 0,    ObjectDelete },
  378. {  "med-obj-move-forward",                     0,    ObjectMoveForward },
  379. {  "med-obj-move-left",                         0,    ObjectMoveLeft },
  380. {  "med-obj-set-default",                     0,    ObjectSetDefault },
  381. {  "med-obj-move-right",                     0,    ObjectMoveRight },
  382. {  "med-obj-move-back",                         0,    ObjectMoveBack },
  383. {  "med-obj-move-down",                         0,    ObjectMoveDown },
  384. {  "med-obj-move-up",                         0,    ObjectMoveUp },
  385. {  "med-obj-select-next-in-segment",     0,    ObjectSelectNextinSegment },
  386. {  "med-obj-decrease-bank",                 0,    ObjectDecreaseBank },
  387. {  "med-obj-increase-bank",                 0,    ObjectIncreaseBank },
  388. {  "med-obj-decrease-pitch",                 0,    ObjectDecreasePitch },
  389. {  "med-obj-increase-pitch",                 0,    ObjectIncreasePitch },
  390. {  "med-obj-decrease-heading",              0,    ObjectDecreaseHeading },
  391. {  "med-obj-increase-heading",              0,    ObjectIncreaseHeading },
  392. {  "med-obj-decrease-bank-big",             0,    ObjectDecreaseBankBig },
  393. {  "med-obj-increase-bank-big",             0,    ObjectIncreaseBankBig },
  394. {  "med-obj-decrease-pitch-big",             0,    ObjectDecreasePitchBig },
  395. {  "med-obj-increase-pitch-big",             0,    ObjectIncreasePitchBig },
  396. {  "med-obj-decrease-heading-big",          0,    ObjectDecreaseHeadingBig },
  397. {  "med-obj-increase-heading-big",          0,    ObjectIncreaseHeadingBig },
  398. {  "med-obj-reset",                             0,    ObjectResetObject },
  399. {  "med-obj-flip",                             0,    ObjectFlipObject },
  400. {    "med-obj-make-coop",                     0,    ObjectMakeCoop },
  401. //{    "med-obj-place-hostage",                  0,    ObjectPlaceHostage },
  402.  
  403. // In objpage.c
  404. {    "med-obj-select-next-type",             0,    objpage_goto_next_object },
  405.  
  406.  
  407. //    In elight.c
  408. {    "med-light-select-next-vertex",         0,    LightSelectNextVertex },
  409. {    "med-light-select-next-edge",             0,    LightSelectNextEdge },
  410. {    "med-light-copy-intensity-side",         0,    LightCopyIntensity },
  411. {    "med-light-copy-intensity-segment",     0,    LightCopyIntensitySegment },
  412. {    "med-light-decrease-light-vertex",     0,    LightDecreaseLightVertex },
  413. {    "med-light-increase-light-vertex",     0,    LightIncreaseLightVertex },
  414. {    "med-light-decrease-light-side",         0,    LightDecreaseLightSide },
  415. {    "med-light-increase-light-side",         0,    LightIncreaseLightSide },
  416. {    "med-light-decrease-light-segment",     0,    LightDecreaseLightSegment },
  417. {    "med-light-increase-light-segment",     0,    LightIncreaseLightSegment },
  418. {    "med-light-set-maximum",                  0,    LightSetMaximum },
  419. {    "med-light-set-default",                  0,    LightSetDefault },
  420. {    "med-light-assign-default-all",         0,    LightSetDefaultAll },
  421. {    "med-light-ambient-lighting",             0,    LightAmbientLighting },
  422.  
  423. // In seguvs.c                                                                        
  424. {    "med-seguvs-fix-bogus-uvs-on-side",     0,    fix_bogus_uvs_on_side},
  425. {    "med-seguvs-fix-bogus-uvs-all",          0,    fix_bogus_uvs_all},
  426. {    "med-seguvs-smooth-lighting-all",     0,   set_average_light_on_all},
  427. {    "med-seguvs-smooth-lighting-all-quick",     0,   set_average_light_on_all_quick},
  428. {    "med-seguvs-smooth-lighting",              0,   set_average_light_on_curside},
  429.  
  430. // Miscellaneous, please neaten and catagorize me!
  431.  
  432. {   "med-increase-draw-depth",          0,        IncreaseDrawDepth },
  433. {   "med-decrease-draw-depth",          0,        DecreaseDrawDepth },
  434. {   "med-goto-game",                    0,        GotoGame },
  435. {   "med-goto-game-screen",             0,        GotoGameScreen },
  436. {   "med-drop-into-debugger",           0,        DropIntoDebugger },
  437. // {   "med-sync-large-view",              0,        SyncLargeView },
  438. {   "med-create-default-new-segment",   0,        CreateDefaultNewSegment },
  439. {   "med-create-default-new-segment-and-attach",   0,        CreateDefaultNewSegmentandAttach },
  440. {   "med-clear-selected-list",          0,        ClearSelectedList },
  441. {   "med-clear-found-list",             0,        ClearFoundList },
  442. {   "med-sort-selected-list",           0,        SortSelectedList },
  443. {   "med-set-player-from-curseg",       0,        SetPlayerFromCursegAndRotate },
  444. {   "med-set-player-from-curseg-minus-one", 0,        SetPlayerFromCursegMinusOne },
  445. {   "med-find-concave-segs",            0,        FindConcaveSegs },
  446. {   "med-select-next-found-seg",        0,        SelectNextFoundSeg },
  447. {   "med-select-prev-found-seg",        0,        SelectPreviousFoundSeg },
  448. {   "med-stop-slew",                    0,        slew_stop },
  449. //{   "med-reset-orientation",            0,        do_reset_orient },
  450. {   "med-game-zoom-out",                0,        GameZoomOut },
  451. {   "med-game-zoom-in",                 0,        GameZoomIn },
  452. {     "med-keypad-goto-prev",                 0,        med_keypad_goto_prev },
  453. {     "med-keypad-goto-next",                 0,        med_keypad_goto_next },
  454. {     "med-keypad-goto",                 1,        med_keypad_goto },
  455.  
  456. // John's temporary function page stuff
  457. // {   "med-set-function-page",            1,        medtmp_set_page },
  458.  
  459. // In fuelcen.c
  460. {    "med-fuelcen-create",                    0,     fuelcen_create_from_curseg },
  461. {    "med-repaircen-create",                    0,     repaircen_create_from_curseg },
  462. {    "med-controlcen-create",                    0,  controlcen_create_from_curseg },
  463. {    "med-robotmaker-create",                    0,  robotmaker_create_from_curseg },
  464. {     "med-fuelcen-reset-all",                     0,  fuelcen_reset_all },
  465. {    "med-fuelcen-delete",                    0,        fuelcen_delete_from_curseg },
  466.  
  467. // In robot.c
  468. {    "do-robot-dialog",                            0, do_robot_dialog },
  469. {    "do-object-dialog",                            0, do_object_dialog },
  470. {    "do-hostage-dialog",                            0, do_hostage_dialog },
  471.  
  472. // In gamesavec
  473. {    "rename-level",                            0, get_level_name },
  474.  
  475. // The terminating marker
  476. {   NULL, 0, NULL } };
  477.  
  478. void init_med_functions()
  479. {
  480.     func_init(med_functions, (sizeof(med_functions)/sizeof(FUNCTION))-1 );
  481. }
  482.  
  483. 
  484.