diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-25 15:22:54 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-25 15:22:54 +0000 |
commit | 8e9952956dddf37edefeb69c009def3f0dff23eb (patch) | |
tree | 2b0c591b03e4c4542999fad3200a726fcdf962b6 /src/game.cpp | |
parent | c784dea82dbeee0133077a1b673f5652c59c2f77 (diff) | |
download | mana-8e9952956dddf37edefeb69c009def3f0dff23eb.tar.gz mana-8e9952956dddf37edefeb69c009def3f0dff23eb.tar.bz2 mana-8e9952956dddf37edefeb69c009def3f0dff23eb.tar.xz mana-8e9952956dddf37edefeb69c009def3f0dff23eb.zip |
Taking screenshot seems to work now. Another more cleanup, maybe last before
I might actually add something useful, heh.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/src/game.cpp b/src/game.cpp index 98d8baab..d3d34fbd 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -152,13 +152,16 @@ void do_init() { remove("./docs/packet.list"); } -/** Clean the engine */ +/** + * Clean the engine + */ void do_exit() { } -/** Check user input */ +/** + * Check user input + */ void do_input() { - if(walk_status==0) { int x = get_x(player_node->coordinates); int y = get_y(player_node->coordinates); @@ -206,28 +209,31 @@ void do_input() { } } - if(player_node->action==STAND) - if(key[KEY_LCONTROL]) { - player_node->action = ATTACK; - attack(get_x(player_node->coordinates), get_y(player_node->coordinates), get_direction(player_node->coordinates)); - player_node->tick_time = tick_time; - } + if (player_node->action == STAND) { + if (key[KEY_LCONTROL]) { + player_node->action = ATTACK; + attack(get_x(player_node->coordinates), + get_y(player_node->coordinates), + get_direction(player_node->coordinates)); + player_node->tick_time = tick_time; + } + } - if(key[KEY_F1]) { - save_bitmap("./data/graphic/screenshot.bmp", double_buffer, NULL); - } else if(key[KEY_F12]){ - sound.SetAdjVol( 1, 1, 1); - } else if(key[KEY_F11]){ - sound.SetAdjVol(-1,-1,-1); - } - if(key[KEY_F5] && action_time==true) { - if(player_node->action==STAND) - action(2, 0); - else if(player_node->action==SIT) - action(3, 0); - action_time = false; - //alert("","","","","",0,0); - } + if (key[KEY_F1]) { + save_bitmap("./data/graphic/screenshot.bmp", vpage[page_num], NULL); + } else if (key[KEY_F12]){ + sound.SetAdjVol( 1, 1, 1); + } else if (key[KEY_F11]){ + sound.SetAdjVol(-1,-1,-1); + } + if (key[KEY_F5] && action_time) { + if (player_node->action == STAND) + action(2, 0); + else if (player_node->action == SIT) + action(3, 0); + action_time = false; + //alert("","","","","",0,0); + } if(key[KEY_F10] && action_time==true) { //was 3 goes to 0 |