void MyConfig::customload(LispReader& reader)
{
- reader.read_int ("keyboard-jump", keymap.jump);
- reader.read_int ("keyboard-activate", keymap.activate);
- reader.read_int ("keyboard-duck", keymap.duck);
+ reader.read_int ("keyboard-up", keymap.up);
+ reader.read_int ("keyboard-down", keymap.down);
reader.read_int ("keyboard-left", keymap.left);
reader.read_int ("keyboard-right", keymap.right);
- reader.read_int ("keyboard-fire", keymap.fire);
+ reader.read_int ("keyboard-jump", keymap.jump);
+ reader.read_int ("keyboard-power", keymap.power);
}
void MyConfig::customsave(FILE * config)
{
- fprintf(config, "\t(keyboard-jump %d)\n", keymap.jump);
- fprintf(config, "\t(keyboard-duck %d)\n", keymap.duck);
+ fprintf(config, "\t(keyboard-up %d)\n", keymap.up);
+ fprintf(config, "\t(keyboard-down %d)\n", keymap.down);
fprintf(config, "\t(keyboard-left %d)\n", keymap.left);
fprintf(config, "\t(keyboard-right %d)\n", keymap.right);
- fprintf(config, "\t(keyboard-fire %d)\n", keymap.fire);
- fprintf(config, "\t(keyboard-activate %d)\n", keymap.activate);
-
+ fprintf(config, "\t(keyboard-jump %d)\n", keymap.jump);
+ fprintf(config, "\t(keyboard-power %d)\n", keymap.power);
}
void process_options_menu(void)
if(use_gl != options_menu->isToggled(MNID_OPENGL))
{
use_gl = !use_gl;
- st_video_setup();
+ Setup::video(screen->w,screen->h);
}
#else
options_menu->get_item_by_id(MNID_OPENGL).toggled = false;
if(use_fullscreen != options_menu->isToggled(MNID_FULLSCREEN))
{
use_fullscreen = !use_fullscreen;
- st_video_setup();
+ Setup::video(screen->w,screen->h);
}
break;
case MNID_SOUND:
- if(use_sound != options_menu->isToggled(MNID_SOUND))
- use_sound = !use_sound;
+ if(SoundManager::get()->sound_enabled() != options_menu->isToggled(MNID_SOUND))
+ SoundManager::get()->enable_sound(!SoundManager::get()->sound_enabled());
break;
case MNID_MUSIC:
- if(use_music != options_menu->isToggled(MNID_MUSIC))
+ if(SoundManager::get()->music_enabled() != options_menu->isToggled(MNID_MUSIC))
{
- use_music = !use_music;
- sound_manager->enable_music(use_music);
+ SoundManager::get()->enable_music(!SoundManager::get()->music_enabled());
}
break;
case MNID_SHOWFPS:
options_menu->additem(MN_DEACTIVE,_("OpenGL (not supported)"),use_gl, 0, MNID_OPENGL);
#endif
options_menu->additem(MN_TOGGLE,_("Fullscreen"),use_fullscreen,0, MNID_FULLSCREEN);
- if(audio_device)
+ if(SoundManager::get()->audio_device_available())
{
- options_menu->additem(MN_TOGGLE,_("Sound "), use_sound,0, MNID_SOUND);
- options_menu->additem(MN_TOGGLE,_("Music "), use_music,0, MNID_MUSIC);
+ options_menu->additem(MN_TOGGLE,_("Sound "), SoundManager::get()->sound_enabled(),0, MNID_SOUND);
+ options_menu->additem(MN_TOGGLE,_("Music "), SoundManager::get()->music_enabled(),0, MNID_MUSIC);
}
else
{
options_keys_menu->additem(MN_HL,"",0,0);
options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Left move"), 0,0, 0,&keymap.left);
options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Right move"), 0,0, 0,&keymap.right);
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Up/Activate"), 0,0, 0,&keymap.up);
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Down/Duck"), 0,0, 0,&keymap.down);
options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Jump"), 0,0, 0,&keymap.jump);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Duck"), 0,0, 0,&keymap.duck);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Activate"), 0, 0, 0,
- &keymap.activate);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Power/Run"), 0,0, 0,&keymap.fire);
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Power/Run"), 0,0, 0,&keymap.power);
options_keys_menu->additem(MN_HL,"",0,0);
options_keys_menu->additem(MN_BACK,_("Back"),0,0);