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