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