]> icculus.org git repositories - btb/d2x.git/blob - main/editor/khelp.c
Enable global structs for mine saving functions
[btb/d2x.git] / main / editor / khelp.c
1 /* $Id: khelp.c,v 1.3 2004-12-19 15:21:11 btb Exp $ */
2 /*
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
13 */
14
15 /*
16  *
17  * Functions for showing help.
18  *
19  */
20
21 #ifdef RCS
22 static char rcsid[] = "$Id: khelp.c,v 1.3 2004-12-19 15:21:11 btb Exp $";
23 #endif
24
25 #ifdef HAVE_CONFIG_H
26 #include "conf.h"
27 #endif
28
29 #include "inferno.h"
30 #include "editor.h"
31
32 #include "ui.h"
33
34 static char MainHelpText[] = "\nMED General Functions\n\n" \
35 "SPACEBAR         Full Redraw\n" \
36 "BACKSPACE        Drop into debugger\n\n" \
37 "A                Attach a segment\n" \
38 "D                Delete current segment\n\n" \
39 "F                Toggle to game\n" \
40 "G or S           Go to game (Toggle screen)\n\n" \
41 "ALT-C            Create new mine\n" \
42 "ALT-S            Save mine\n" \
43 "ALT-L            Load mine\n"\
44 "ESC              Exit editor\n"\
45 "ALT-Q/CTRL-Q/SHIFT-Q also Exit editor\n";
46
47 static char SegmentHelpText[] = "MED Segment Functions\n\n" \
48 "ALT-B            Create Bridge from current to marked segment\n" \
49 "ALT-E            Exchange current and marked segments\n" \
50 "ALT-J            Create Joint between current and marked segments\n" \
51 "ALT-SHIFT-J      Create Joint on current side and adjacent segments\n" \
52 "ALT-CTRL-J       Create Joint on current segment and adjacent segments\n" \
53 "ALT-CTRL-SHIFT-J Create Joints on all adjacent segments\n" \
54 "ALT-M            Mark current segment and side\n" \
55 "ALT-N            Create default segment for New_segment\n" \
56 "CTRL-A           Toggle - Draw all segments/Draw connected segments\n" \
57 "CTRL-C           Clear selected list\n" \
58 "CTRL-D           Toggle display of coordinate axes\n" \
59 "CTRL-S           Advance to segment through Curside\n" \
60 "ALT-T            Assign Texture to current side\n" \
61 "CTRL-P           Propogate Textures\n" \
62 "CTRL-SHIFT-P     Propogate Textures on Selected segments\n" \
63 "CTRL-SHIFT-S     Advance to segment opposite Curside\n" \
64 "CTRL-F           Select next side\n" \
65 "CTRL-SHIFT-F     Select previous side\n";
66
67 static char KeyPadHelpText[] = "MED KeyPad Functions\n\n" \
68
69 "SHIFT-KEYPAD FUNCTIONS (Change direction vector of segment)\n" \
70 "----------------------\n" \
71 "(7)                  8 Decrease Pitch   (9)\n" \
72 " 4 Decrease Heading (5)                  6 Increase Heading\n" \
73 " 1 Decrease Bank     2 Increase Pitch    3 Increase Bank\n\n" \
74
75 "CTRL-KEYPAD FUNCTIONS (Change size/shape of segment)\n" \
76 "---------------------\n" \
77 "(7)                  8 Increase Length   9 Increase Height\n" \
78 " 4 Decrease Width   (5)                  6 Increase Width\n" \
79 "(1)                  2 Decrease Length   3 Decrease Height\n"\
80 "\nIn addition, CTRL-SHIFT-KEYPAD Changes size at x5 rate as above\n";
81
82
83 char ViewHelpText[] = "MED View Changing Functions\n\n" \
84 "ALT-V            Change to orthogonal view (1,2,3)\n" \
85 "CTRL-V           Toggle view to current segment\n" \
86 "MINUS (-)        Zoom in\n" \
87 "EQUAL (=)        Zoom out\n" \
88 "SHIFT-MINUS      Decrease viewer distance\n" \
89 "SHIFT-EQUAL      Increase viewer distance\n" \
90 "\n* Holding the Ctrl key and moving the mouse will change\n" \
91 "the viewer's orientation in the main window.";
92
93 //"CTRL-MINUS       Decreases drawing depth\n" 
94 //"CTRL-EQUAL       Increases drawing depth\n" 
95
96 static char GameHelpText[] = "MED Game Screen Functions\n\n" \
97 "KEYPAD FUNCTIONS (Moves in game screen)\n" \
98 "----------------\n" \
99 "(7)                  8 Move Forward     (9)\n" \
100 " 4 Decrease Heading  5 Complete Stop     6 Increase Heading\n" \
101 " 1 Decrease Bank     2 Move Backward     3 Increase Bank\n\n" \
102 "[                Decreases Pitch\n" \
103 "]                Increases Pitch\n" \
104 "C                Set Player from Current segment\n" \
105 "L                Toggle Lock Step\n" \
106 "O                Toggle Outline Mode\n" \
107 "SHIFT-C          Set PLayer from Current segment-1\n" \
108 "SHIFT-L          Toggle Lighting effect\n" \
109 "NUMLOCK          Reset orientation\n" \
110 "PAD DIVIDE (/)   Game Zoom out\n" \
111 "PAD MULTIPLY (*) Game Zoom In\n";
112
113 static char CurveHelpText[] = "MED Curve Generation Functions\n\n" \
114 "ALT-F10          Generate curve\n" \
115 "F8               Delete curve\n" \
116 "F11              'Set' curve\n" \
117 "F9               Decrease r1 vector\n" \
118 "SHIFT-F9         Increase r1 vector\n" \
119 "F10              Decrease r4 vector\n" \
120 "SHIFT-F10        Increase r4 vector\n";
121
122 static char MacrosHelpText[] = "MED Macros Functions\n\n" \
123 "CTRL-INSERT      Play fast\n" \
124 "CTRL-DELETE      Play normal\n" \
125 "CTRL-HOME        Record all\n" \
126 "CTRL-END         Record keys\n" \
127 "CTRL-PAGEUP      Save Macro\n" \
128 "CTRL-PAGEDOWN    Load Macro\n";
129
130 int DoHelp()
131 {
132         int help_key = 2;
133     int more_key = 2;
134     while (help_key > 1)
135         {
136         help_key = MessageBox( -2, -2, 5, MainHelpText, "Ok", "Segment", "Keypad", "View", "More");
137                 if (help_key == 2)
138                         MessageBox( -2, -2, 1, SegmentHelpText, "Ok" );
139                 if (help_key == 3)
140                         MessageBox( -2, -2, 1, KeyPadHelpText, "Ok" );
141                 if (help_key == 4)
142                         MessageBox( -2, -2, 1, ViewHelpText, "Ok" );
143         if (help_key == 5) {
144             more_key = MessageBox( -2, -2, 4, MainHelpText, "Back", "Curve", "Macro", "Game");
145                 if (more_key == 2)
146                     MessageBox( -2, -2, 1, CurveHelpText, "Ok" );
147                 if (help_key == 3)
148                     MessageBox( -2, -2, 1, MacrosHelpText, "Ok" );
149                 if (help_key == 4)
150                     MessageBox( -2, -2, 1, GameHelpText, "Ok" );
151         }
152         }
153         return 1;
154 }