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