1 /* editMode_codes.h
2    Containts all the internal codes & constants for the edit mode and edit windows
3 
4    Copyright (C) 2003-2004  Mathias Broxvall
5 
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10 
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15 
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20 
21 #ifndef EDITMODECODES_H
22 #define EDITMODECODES_H
23 
24 #define N_SUBMENUS 9
25 #define FILE_MENU 0
26 #define EDIT_MENU 1
27 #define COLOR_MENU 2
28 #define FLAGS_MENU 3
29 #define FEATURE_MENU 4
30 #define REPAIR_MENU 5
31 #define MOVE_MENU 6
32 #define WINDOW_MENU 7
33 #define VIEW_MENU 8
34 
35 #define MAX_MENU_ENTRIES 20
36 
37 #define FILE_NEW 00
38 #define FILE_OPEN 01
39 #define FILE_CLOSE 02
40 #define FILE_SAVE 03
41 #define FILE_EXIT 04
42 #define FILE_TEST 05
43 
44 #define EDIT_HEIGHT 20
45 #define EDIT_COLOR 21
46 #define EDIT_WATER 22
47 #define EDIT_VELOCITY 23
48 #define EDIT_LINES 24
49 #define EDIT_ALL 25
50 #define EDIT_UPPER 26
51 #define EDIT_BOTTOM 27
52 #define EDIT_RIGHT 28
53 #define EDIT_LEFT 29
54 #define EDIT_CENTER 30
55 #define EDIT_RAISE_INCREMENT 31
56 #define EDIT_LOWER_INCREMENT 32
57 
58 #define COLOR_RED 40
59 #define COLOR_GREEN 41
60 #define COLOR_BLUE 42
61 #define COLOR_ALPHA 43
62 
63 #define FLAG_0 60
64 #define FLAG_1 61
65 #define FLAG_2 62
66 #define FLAG_3 63
67 #define FLAG_4 64
68 #define FLAG_5 65
69 #define FLAG_6 66
70 #define FLAG_7 67
71 #define FLAG_CH_TEXTURE 69
72 
73 #define FEATURE_SPIKE 80
74 #define FEATURE_SMALL_HILL 81
75 #define FEATURE_MEDIUM_HILL 82
76 #define FEATURE_LARGE_HILL 83
77 #define FEATURE_HUGE_HILL 84
78 #define FEATURE_SMALL_SMOOTH 85
79 #define FEATURE_LARGE_SMOOTH 86
80 
81 #define FEATURE_SPIKE 80
82 #define FEATURE_SMALL_HILL 81
83 #define FEATURE_MEDIUM_HILL 82
84 #define FEATURE_LARGE_HILL 83
85 #define FEATURE_HUGE_HILL 84
86 #define FEATURE_SMALL_SMOOTH 85
87 #define FEATURE_LARGE_SMOOTH 86
88 
89 #define REPAIR_CELL_CONT 100
90 #define REPAIR_WATER_CONT 101
91 #define REPAIR_COLOR_CONT 102
92 #define REPAIR_CELL_CENTERS 103
93 #define REPAIR_WATER_CENTERS 104
94 #define REPAIR_COLOR_CENTERS 105
95 #define REPAIR_CELL_ROUND 106
96 #define REPAIR_WATER_ROUND 107
97 #define REPAIR_COLOR_ROUND 108
98 #define REPAIR_VEL_ROUND 109
99 
100 #define MOVE_UP 120
101 #define MOVE_DOWN 121
102 #define MOVE_LEFT 122
103 #define MOVE_RIGHT 123
104 // BLANK                      124
105 #define MOVE_SHIFT_UP 125
106 #define MOVE_SHIFT_DOWN 126
107 #define MOVE_SHIFT_LEFT 127
108 #define MOVE_SHIFT_RIGHT 128
109 // SHIFT                      129
110 // BLANK                      130
111 #define MOVE_SET_MARKER 131
112 #define MOVE_CLEAR_MARKER 132
113 #define MOVE_COPY_REGION 133
114 #define MOVE_PASTE_REGION 134
115 
116 #define WINDOW_EDITOR 140
117 #define WINDOW_TOOLBAR 141
118 #define WINDOW_STATUS 142
119 
120 #define VIEW_BIRD 160
121 #define VIEW_ROTATE 161
122 #define VIEW_LOAD_ENTITIES 162
123 #define VIEW_CLEAR_ENTITIES 163
124 
125 #define EDITMODE_HEIGHT 0
126 #define EDITMODE_COLOR 1
127 #define EDITMODE_WATER 2
128 #define EDITMODE_VELOCITY 3
129 #define EDITMODE_NOLINES 4
130 #define EDITMODE_FEATURES 5
131 #define N_EDITMODES 6
132 
133 extern char *cMenuNames[N_SUBMENUS];
134 extern char *cMenuEntries[N_SUBMENUS][MAX_MENU_ENTRIES];
135 extern const char *cKeyShortcuts[N_SUBMENUS];
136 
137 /* Converts between SUBMENU id's and highlight codes */
138 #define CODE_FROM_MENU(x) ((x) + 1)
139 #define CODE_TO_MENU(x) ((x)-1)
140 
141 #define CODE_FROM_MENUENTRY(x) (x + 10)
142 #define CODE_TO_MENUENTRY(x) (x - 10)
143 
144 #define CODE_INCREMENT 200
145 #define CODE_EDITMODE 201
146 #define CODE_YES 202
147 #define CODE_NO 203
148 #define CODE_OK 204
149 #define CODE_CANCEL 205
150 #define CODE_PAGE 206
151 #define CODE_MAP0 300
152 
153 #endif
154