Load editor settings from the registry
| 874 | |
| 875 | // Load editor settings from the registry |
| 876 | void LoadEditorSettings() { |
| 877 | oeLnxAppDatabase Editor_database((oeLnxAppDatabase *)Database); |
| 878 | bool res; |
| 879 | int speed = (int)((Slew_key_speed - 0.5) / 0.5); |
| 880 | |
| 881 | res = Editor_database.lookup_record("editor"); |
| 882 | if (!res) { |
| 883 | mprintf(0, "Can't get editor registry path\n"); |
| 884 | Int3(); |
| 885 | return; |
| 886 | } |
| 887 | |
| 888 | Editor_database.read_int("texdlg_texture", &D3EditState.texdlg_texture); |
| 889 | Editor_database.read_int("current_obj_type", &D3EditState.current_obj_type); |
| 890 | Editor_database.read_int("current_powerup", &D3EditState.current_powerup); |
| 891 | Editor_database.read_int("current_door", &D3EditState.current_door); |
| 892 | Editor_database.read_int("current_robot", &D3EditState.current_robot); |
| 893 | Editor_database.read_int("current_clutter", &D3EditState.current_clutter); |
| 894 | Editor_database.read_int("current_building", &D3EditState.current_building); |
| 895 | Editor_database.read_int("current_ship", &D3EditState.current_ship); |
| 896 | Editor_database.read_int("current_sound", &D3EditState.current_sound); |
| 897 | Editor_database.read_int("current_weapon", &D3EditState.current_weapon); |
| 898 | Editor_database.read_int("current_path", &D3EditState.current_path); |
| 899 | Editor_database.read_int("current_node", &D3EditState.current_node); |
| 900 | Editor_database.read_int("current_megacell", &D3EditState.current_megacell); |
| 901 | Editor_database.read("texscr_visible", &D3EditState.texscr_visible); |
| 902 | Editor_database.read_int("texscr_x", &D3EditState.texscr_x); |
| 903 | Editor_database.read_int("texscr_y", &D3EditState.texscr_y); |
| 904 | Editor_database.read_int("texscr_w", &D3EditState.texscr_w); |
| 905 | Editor_database.read_int("texscr_h", &D3EditState.texscr_h); |
| 906 | Editor_database.read("wirescr_visible", &D3EditState.wirescr_visible); |
| 907 | Editor_database.read_int("wirescr_x", &D3EditState.wirescr_x); |
| 908 | Editor_database.read_int("wirescr_y", &D3EditState.wirescr_y); |
| 909 | Editor_database.read_int("wirescr_w", &D3EditState.wirescr_w); |
| 910 | Editor_database.read_int("wirescr_h", &D3EditState.wirescr_h); |
| 911 | Editor_database.read("keypad_visible", &D3EditState.keypad_visible); |
| 912 | Editor_database.read_int("keypad_current", &D3EditState.keypad_current); |
| 913 | Editor_database.read_int("float_keypad_x", &D3EditState.float_keypad_x); |
| 914 | Editor_database.read_int("float_keypad_y", &D3EditState.float_keypad_y); |
| 915 | Editor_database.read_int("float_keypad_w", &D3EditState.float_keypad_w); |
| 916 | Editor_database.read_int("float_keypad_h", &D3EditState.float_keypad_h); |
| 917 | Editor_database.read_int("objmodeless_x", &D3EditState.objmodeless_x); |
| 918 | Editor_database.read_int("objmodeless_y", &D3EditState.objmodeless_y); |
| 919 | Editor_database.read("objmodeless_on", &D3EditState.objmodeless_on); |
| 920 | Editor_database.read("tile_views", &D3EditState.tile_views); |
| 921 | Editor_database.read_int("game_render_mode", &D3EditState.game_render_mode); |
| 922 | Editor_database.read("terrain_dots", &D3EditState.terrain_dots); |
| 923 | Editor_database.read("terrain_flat_shade", &D3EditState.terrain_flat_shade); |
| 924 | Editor_database.read("randomize_megacell", &D3EditState.randomize_megacell); |
| 925 | Editor_database.read_int("box_selection_mode", &D3EditState.box_selection_mode); |
| 926 | Editor_database.read_int("object_move_mode", &D3EditState.object_move_mode); |
| 927 | Editor_database.read("fullscreen_debug", &D3EditState.fullscreen_debug_state); |
| 928 | Editor_database.read_int("object_move_axis", &D3EditState.object_move_axis); |
| 929 | Editor_database.read_int("slew_key_speed", &speed); |
| 930 | Editor_database.read_int("texture_display_flags", &D3EditState.texture_display_flags); |
| 931 | Editor_database.read_int("joy_slewing", &D3EditState.joy_slewing); |
| 932 | |
| 933 | Slew_key_speed = ((float)speed * 0.5) + 0.5; |
no test coverage detected