X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=roguelike.c;h=bc21ab5a0dfb5b6c23bbc51fac3b514f777b5e81;hb=c4dd7e96a38e28dbfd50104cfc8ab35eff5fbf77;hp=362826c9b863a3c78808a33a0eb2241000b8138e;hpb=296a2a113e6db94bf38ddb5b74e433799a400315;p=plomrogue diff --git a/roguelike.c b/roguelike.c index 362826c..bc21ab5 100644 --- a/roguelike.c +++ b/roguelike.c @@ -475,9 +475,9 @@ int main () { if (key == get_action_key(world.keybindings, "quit")) break; else if (key == get_action_key(world.keybindings, "scroll pad right")) - win_meta.pad_offset++; - else if (key == get_action_key(world.keybindings, "scroll pad left") && win_meta.pad_offset > 0) - win_meta.pad_offset--; + scroll_pad (&win_meta, '+'); + else if (key == get_action_key(world.keybindings, "scroll pad left")) + scroll_pad (&win_meta, '-'); else if (key == get_action_key(world.keybindings, "toggle keys window")) toggle_window(&win_meta, &win_keys); else if (key == get_action_key(world.keybindings, "toggle map window")) @@ -494,13 +494,13 @@ int main () { shift_window(&win_meta, 'f'); else if (key == get_action_key(world.keybindings, "shift backwards")) shift_window(&win_meta, 'b'); - else if (key == get_action_key(world.keybindings, "grow horizontally") && win_meta.active != 0) + else if (key == get_action_key(world.keybindings, "grow horizontally")) resize_window(&win_meta, '*'); - else if (key == get_action_key(world.keybindings, "shrink horizontally") && win_meta.active != 0) + else if (key == get_action_key(world.keybindings, "shrink horizontally")) resize_window(&win_meta, '_'); - else if (key == get_action_key(world.keybindings, "grow vertically") && win_meta.active != 0) + else if (key == get_action_key(world.keybindings, "grow vertically")) resize_window(&win_meta, '+'); - else if (key == get_action_key(world.keybindings, "shrink vertically") && win_meta.active != 0) + else if (key == get_action_key(world.keybindings, "shrink vertically")) resize_window(&win_meta, '-'); else if (key == get_action_key(world.keybindings, "save keys")) save_keybindings(&world);