Rev 493 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 493 | Rev 517 | ||
---|---|---|---|
Line 160... | Line 160... | ||
160 | 160 | ||
161 | public long keyCode2mask(int keyCode) |
161 | public long keyCode2mask(int keyCode) |
162 | { |
162 | { |
163 | if ((keyCode>=KEY_NUM0)&&(keyCode<=KEY_NUM9)) |
163 | if ((keyCode>=KEY_NUM0)&&(keyCode<=KEY_NUM9)) |
164 | return 1<<(keyCode-KEY_NUM0); |
164 | return 1<<(keyCode-KEY_NUM0); |
165 | else |
165 | |
166 | switch (getGameAction( keyCode )) |
166 | switch (getGameAction( keyCode )) |
167 | { |
167 | { |
168 | case UP: |
168 | case UP: |
169 | return 1<<10; |
169 | return 1<<10; |
170 | case DOWN: |
170 | case DOWN: |
171 | return 1<<11; |
171 | return 1<<11; |
172 | case LEFT: |
172 | case LEFT: |
173 | return 1<<12; |
173 | return 1<<12; |
174 | case RIGHT: |
174 | case RIGHT: |
175 | return 1<<13; |
175 | return 1<<13; |
176 | case FIRE: |
176 | case FIRE: |
- | 177 | return 1<<14; |
|
- | 178 | ||
- | 179 | } |
|
- | 180 | ||
- | 181 | switch ( keyCode ) |
|
- | 182 | { |
|
- | 183 | case KEY_STAR: |
|
177 | return 1<<14; |
184 | return 1<<15; |
178 | } |
185 | } |
179 | // log("unmapped key"); |
186 | // log("unmapped key"); |
180 | return 0; // cant translate |
187 | return 0; // cant translate |
Line 181... | Line 188... | ||
181 | } |
188 | } |
Line 384... | Line 391... | ||
384 | 391 | ||
385 | 392 | ||
386 | // only mk |
393 | // only mk |
- | 394 | if (mk.is_mk()) |
|
- | 395 | { |
|
- | 396 | // tmp_menu_add("Start Engines",ACTIONID_START_ENGINES); |
|
387 | if (mk.is_mk()) |
397 | |
388 | { |
398 | |
389 | tmp_menu_add(l(STRINGID_MOTORTEST),ACTIONID_MOTORTEST); |
399 | tmp_menu_add(l(STRINGID_MOTORTEST),ACTIONID_MOTORTEST); |
390 | tmp_menu_add(l(STRINGID_KEYCONTROL),ACTIONID_KEYCONTROL); |
400 | tmp_menu_add(l(STRINGID_KEYCONTROL),ACTIONID_KEYCONTROL); |
391 | tmp_menu_add(l(STRINGID_RCDATA),ACTIONID_RCDATA); |
401 | tmp_menu_add(l(STRINGID_RCDATA),ACTIONID_RCDATA); |
Line 392... | Line 402... | ||
392 | tmp_menu_add(l(STRINGID_FLIGHTSETTINGS),ACTIONID_PARAM_MENU); |
402 | tmp_menu_add(l(STRINGID_FLIGHTSETTINGS),ACTIONID_PARAM_MENU); |
393 | tmp_menu_add(l(STRINGID_GRAPH),ACTIONID_GRAPH); |
403 | tmp_menu_add(l(STRINGID_GRAPH),ACTIONID_GRAPH); |
Line 394... | Line 404... | ||
394 | 404 | ||
395 | tmp_menu_add("Mixer",ACTIONID_SELECT_MIXER); |
405 | tmp_menu_add("Mixer",ACTIONID_SELECT_MIXER); |
396 | } |
406 | } |
397 | 407 | ||
398 | if ( mk.is_rangeextender()|| mk.is_followme() ) |
408 | if ( mk.is_rangeextender()|| mk.is_followme() || mk.is_riddim() ) |
Line 1834... | Line 1844... | ||
1834 | g.drawString("voice_volts_cnt"+ status_voice.volts_play_cnt ,0,y_off,Graphics.TOP | Graphics.LEFT); |
1844 | g.drawString("voice_volts_cnt"+ status_voice.volts_play_cnt ,0,y_off,Graphics.TOP | Graphics.LEFT); |
1835 | y_off+=spacer_small; |
1845 | y_off+=spacer_small; |
Line 1836... | Line 1846... | ||
1836 | 1846 | ||
1837 | g.drawString("do volts sound"+ settings.do_volts_sound ,0,y_off,Graphics.TOP | Graphics.LEFT); |
1847 | g.drawString("do volts sound"+ settings.do_volts_sound ,0,y_off,Graphics.TOP | Graphics.LEFT); |
- | 1848 | y_off+=spacer_small; |
|
- | 1849 | ||
- | 1850 | ||
1838 | y_off+=spacer_small; |
1851 | |
- | 1852 | //#endif |
|
- | 1853 | ||
1839 | //#endif |
1854 | |
1840 | break; |
1855 | break; |
Line 1841... | Line 1856... | ||
1841 | case STATEID_DATABUFF: |
1856 | case STATEID_DATABUFF: |
Line 2038... | Line 2053... | ||
2038 | 2053 | ||
2039 | y_off+=spacer_medium; |
2054 | y_off+=spacer_medium; |
Line 2040... | Line 2055... | ||
2040 | g.drawString("6 or 9 =>gas " + mk.extern_control[EXTERN_CONTROL_GAS],0,y_off,Graphics.TOP | Graphics.LEFT); |
2055 | g.drawString("6 or 9 =>gas " + mk.extern_control[EXTERN_CONTROL_GAS],0,y_off,Graphics.TOP | Graphics.LEFT); |
- | 2056 | ||
- | 2057 | y_off+=spacer_medium; |
|
- | 2058 | g.drawString("5 => start engines ",0,y_off,Graphics.TOP | Graphics.LEFT); |
|
- | 2059 | ||
- | 2060 | // y_off+=spacer_medium; |
|
- | 2061 | //g.drawString("5 => start engines ",0,y_off,Graphics.TOP | Graphics.LEFT); |
|
- | 2062 | ||
2041 | 2063 | ||
2042 | y_off+=spacer_medium; |
2064 | y_off+=spacer_medium; |
2043 | g.drawString("* and # =>exit",0,y_off,Graphics.TOP | Graphics.LEFT); |
2065 | g.drawString("* and # =>exit",0,y_off,Graphics.TOP | Graphics.LEFT); |
2044 | y_off+=spacer_medium; |
2066 | y_off+=spacer_medium; |
2045 | /* g.drawString("* and Fire =>Start Engines",0,y_off,Graphics.TOP | Graphics.LEFT); |
2067 | /* g.drawString("* and Fire =>Start Engines",0,y_off,Graphics.TOP | Graphics.LEFT); |
Line 3163... | Line 3185... | ||
3163 | 3185 | ||
3164 | 3186 | ||
3165 | case ACTIONID_EDIT_PARAMS: |
3187 | case ACTIONID_EDIT_PARAMS: |
- | 3188 | chg_state(STATEID_EDIT_PARAMS); |
|
- | 3189 | break; |
|
- | 3190 | ||
- | 3191 | case ACTIONID_START_ENGINES: |
|
3166 | chg_state(STATEID_EDIT_PARAMS); |
3192 | mk.start_engines(); |
3167 | break; |
3193 | break; |
3168 | case ACTIONID_SELECT_PARAMS: |
3194 | case ACTIONID_SELECT_PARAMS: |
3169 | select_paramset4edit=true; |
3195 | select_paramset4edit=true; |
3170 | read_paramset_intension_save=false; |
3196 | read_paramset_intension_save=false; |
Line 3401... | Line 3427... | ||
3401 | 3427 | ||
3402 | debug.log("KeyCode:"+keyCode); |
3428 | debug.log("KeyCode:"+keyCode); |
3403 | // key-actions common in all states |
3429 | // key-actions common in all states |
Line 3404... | Line 3430... | ||
3404 | debug.process_key(keyCode); |
3430 | debug.process_key(keyCode); |
3405 | 3431 | ||
3406 | 3432 | ||
3407 | if ( key_bitfield==(keyCode2mask(KEY_NUM0)|keyCode2mask(KEY_STAR))) |
3433 | if ( key_bitfield==(keyCode2mask(KEY_NUM0)|keyCode2mask(KEY_STAR))) |
3408 | { |
3434 | { |
3409 | chg_state(STATEID_MAINMENU); |
3435 | chg_state(STATEID_MAINMENU); |
- | 3436 | return; |
|
3410 | return; |
3437 | } |
3411 | } |
3438 | |
3412 | 3439 | ||
3413 | if (state!=STATEID_MAP) |
3440 | if (state!=STATEID_MAP) |
3414 | { |
3441 | { |
3415 | if (((keyCode==KEY_STAR) || (keyCode==settings.key_back) )&&(state!=STATEID_KEYCONTROL))//&&(state!= STATEID_STRINGINPUT)) |
3442 | if (((keyCode==KEY_STAR) || (keyCode==settings.key_back) )&&(state!=STATEID_KEYCONTROL))//&&(state!= STATEID_STRINGINPUT)) |
3416 | { |
3443 | { |
3417 | chg_state(STATEID_MAINMENU); |
3444 | chg_state(STATEID_MAINMENU); |
3418 | return; |
3445 | return; |
3419 | } |
3446 | } |
3420 | } |
3447 | } |
3421 | 3448 | ||
3422 | if (((keyCode==KEY_POUND)||(keyCode==settings.key_fullscreen))&&(state!=STATEID_KEYCONTROL)) |
3449 | if (((keyCode==KEY_POUND)||(keyCode==settings.key_fullscreen))&&(state!=STATEID_KEYCONTROL)) |
Line 3423... | Line 3450... | ||
3423 | { |
3450 | { |
Line 3620... | Line 3647... | ||
3620 | keycontrol_exit |= 2; |
3647 | keycontrol_exit |= 2; |
3621 | else |
3648 | else |
3622 | mod_external_control_by_keycode(keyCode,(byte)1); |
3649 | mod_external_control_by_keycode(keyCode,(byte)1); |
Line -... | Line 3650... | ||
- | 3650 | ||
- | 3651 | ||
Line 3623... | Line 3652... | ||
3623 | 3652 | if (keyCode==KEY_NUM5) |
|
3624 | 3653 | process_action(ACTIONID_START_ENGINES); |
|
Line 3625... | Line 3654... | ||
3625 | 3654 |