]> icculus.org git repositories - btb/d2x.git/blob - main/editor/khelp.c
imported missing editor files from d1x
[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  * $Source: /cvs/cvsroot/d2x/main/editor/khelp.c,v $
15  * $Revision: 1.1 $
16  * $Author: btb $
17  * $Date: 2004-12-19 13:54:27 $
18  *
19  * Functions for showing help.
20  *
21  * $Log: not supported by cvs2svn $
22  * Revision 1.1.1.1  1999/06/14 22:03:26  donut
23  * Import of d1x 1.37 source.
24  *
25  * Revision 2.0  1995/02/27  11:34:27  john
26  * Version 2.0! No anonymous unions, Watcom 10.0, with no need
27  * for bitmaps.tbl.
28  * 
29  * Revision 1.5  1993/12/02  12:39:30  matt
30  * Removed extra includes
31  * 
32  * Revision 1.4  1993/11/05  17:32:57  john
33  * added funcs
34  * .,
35  * 
36  * Revision 1.3  1993/11/03  13:42:41  yuan
37  * Updated help commands
38  * 
39  * Revision 1.2  1993/10/22  19:48:07  yuan
40  * added ctrl-shift-keypad comment in help.
41  * 
42  * Revision 1.1  1993/10/13  18:53:16  john
43  * Initial revision
44  * 
45  *
46  */
47
48 #ifdef RCS
49 static char rcsid[] = "$Id: khelp.c,v 1.1 2004-12-19 13:54:27 btb Exp $";
50 #endif
51
52 #include "inferno.h"
53 #include "editor.h"
54
55 #include "ui.h"
56
57 static char MainHelpText[] = "\nMED General Functions\n\n" \
58 "SPACEBAR         Full Redraw\n" \
59 "BACKSPACE        Drop into debugger\n\n" \
60 "A                Attach a segment\n" \
61 "D                Delete current segment\n\n" \
62 "F                Toggle to game\n" \
63 "G or S           Go to game (Toggle screen)\n\n" \
64 "ALT-C            Create new mine\n" \
65 "ALT-S            Save mine\n" \
66 "ALT-L            Load mine\n"\
67 "ESC              Exit editor\n"\
68 "ALT-Q/CTRL-Q/SHIFT-Q also Exit editor\n";
69
70 static char SegmentHelpText[] = "MED Segment Functions\n\n" \
71 "ALT-B            Create Bridge from current to marked segment\n" \
72 "ALT-E            Exchange current and marked segments\n" \
73 "ALT-J            Create Joint between current and marked segments\n" \
74 "ALT-SHIFT-J      Create Joint on current side and adjacent segments\n" \
75 "ALT-CTRL-J       Create Joint on current segment and adjacent segments\n" \
76 "ALT-CTRL-SHIFT-J Create Joints on all adjacent segments\n" \
77 "ALT-M            Mark current segment and side\n" \
78 "ALT-N            Create default segment for New_segment\n" \
79 "CTRL-A           Toggle - Draw all segments/Draw connected segments\n" \
80 "CTRL-C           Clear selected list\n" \
81 "CTRL-D           Toggle display of coordinate axes\n" \
82 "CTRL-S           Advance to segment through Curside\n" \
83 "ALT-T            Assign Texture to current side\n" \
84 "CTRL-P           Propogate Textures\n" \
85 "CTRL-SHIFT-P     Propogate Textures on Selected segments\n" \
86 "CTRL-SHIFT-S     Advance to segment opposite Curside\n" \
87 "CTRL-F           Select next side\n" \
88 "CTRL-SHIFT-F     Select previous side\n";
89
90 static char KeyPadHelpText[] = "MED KeyPad Functions\n\n" \
91
92 "SHIFT-KEYPAD FUNCTIONS (Change direction vector of segment)\n" \
93 "----------------------\n" \
94 "(7)                  8 Decrease Pitch   (9)\n" \
95 " 4 Decrease Heading (5)                  6 Increase Heading\n" \
96 " 1 Decrease Bank     2 Increase Pitch    3 Increase Bank\n\n" \
97
98 "CTRL-KEYPAD FUNCTIONS (Change size/shape of segment)\n" \
99 "---------------------\n" \
100 "(7)                  8 Increase Length   9 Increase Height\n" \
101 " 4 Decrease Width   (5)                  6 Increase Width\n" \
102 "(1)                  2 Decrease Length   3 Decrease Height\n"\
103 "\nIn addition, CTRL-SHIFT-KEYPAD Changes size at x5 rate as above\n";
104
105
106 char ViewHelpText[] = "MED View Changing Functions\n\n" \
107 "ALT-V            Change to orthogonal view (1,2,3)\n" \
108 "CTRL-V           Toggle view to current segment\n" \
109 "MINUS (-)        Zoom in\n" \
110 "EQUAL (=)        Zoom out\n" \
111 "SHIFT-MINUS      Decrease viewer distance\n" \
112 "SHIFT-EQUAL      Increase viewer distance\n" \
113 "\n* Holding the Ctrl key and moving the mouse will change\n" \
114 "the viewer's orientation in the main window.";
115
116 //"CTRL-MINUS       Decreases drawing depth\n" 
117 //"CTRL-EQUAL       Increases drawing depth\n" 
118
119 static char GameHelpText[] = "MED Game Screen Functions\n\n" \
120 "KEYPAD FUNCTIONS (Moves in game screen)\n" \
121 "----------------\n" \
122 "(7)                  8 Move Forward     (9)\n" \
123 " 4 Decrease Heading  5 Complete Stop     6 Increase Heading\n" \
124 " 1 Decrease Bank     2 Move Backward     3 Increase Bank\n\n" \
125 "[                Decreases Pitch\n" \
126 "]                Increases Pitch\n" \
127 "C                Set Player from Current segment\n" \
128 "L                Toggle Lock Step\n" \
129 "O                Toggle Outline Mode\n" \
130 "SHIFT-C          Set PLayer from Current segment-1\n" \
131 "SHIFT-L          Toggle Lighting effect\n" \
132 "NUMLOCK          Reset orientation\n" \
133 "PAD DIVIDE (/)   Game Zoom out\n" \
134 "PAD MULTIPLY (*) Game Zoom In\n";
135
136 static char CurveHelpText[] = "MED Curve Generation Functions\n\n" \
137 "ALT-F10          Generate curve\n" \
138 "F8               Delete curve\n" \
139 "F11              'Set' curve\n" \
140 "F9               Decrease r1 vector\n" \
141 "SHIFT-F9         Increase r1 vector\n" \
142 "F10              Decrease r4 vector\n" \
143 "SHIFT-F10        Increase r4 vector\n";
144
145 static char MacrosHelpText[] = "MED Macros Functions\n\n" \
146 "CTRL-INSERT      Play fast\n" \
147 "CTRL-DELETE      Play normal\n" \
148 "CTRL-HOME        Record all\n" \
149 "CTRL-END         Record keys\n" \
150 "CTRL-PAGEUP      Save Macro\n" \
151 "CTRL-PAGEDOWN    Load Macro\n";
152
153 int DoHelp()
154 {
155         int help_key = 2;
156     int more_key = 2;
157     while (help_key > 1)
158         {
159         help_key = MessageBox( -2, -2, 5, MainHelpText, "Ok", "Segment", "Keypad", "View", "More");
160                 if (help_key == 2)
161                         MessageBox( -2, -2, 1, SegmentHelpText, "Ok" );
162                 if (help_key == 3)
163                         MessageBox( -2, -2, 1, KeyPadHelpText, "Ok" );
164                 if (help_key == 4)
165                         MessageBox( -2, -2, 1, ViewHelpText, "Ok" );
166         if (help_key == 5) {
167             more_key = MessageBox( -2, -2, 4, MainHelpText, "Back", "Curve", "Macro", "Game");
168                 if (more_key == 2)
169                     MessageBox( -2, -2, 1, CurveHelpText, "Ok" );
170                 if (help_key == 3)
171                     MessageBox( -2, -2, 1, MacrosHelpText, "Ok" );
172                 if (help_key == 4)
173                     MessageBox( -2, -2, 1, GameHelpText, "Ok" );
174         }
175         }
176         return 1;
177 }