summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-25 15:22:54 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-25 15:22:54 +0000
commit8e9952956dddf37edefeb69c009def3f0dff23eb (patch)
tree2b0c591b03e4c4542999fad3200a726fcdf962b6 /src/game.cpp
parentc784dea82dbeee0133077a1b673f5652c59c2f77 (diff)
downloadmana-client-8e9952956dddf37edefeb69c009def3f0dff23eb.tar.gz
mana-client-8e9952956dddf37edefeb69c009def3f0dff23eb.tar.bz2
mana-client-8e9952956dddf37edefeb69c009def3f0dff23eb.tar.xz
mana-client-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.cpp54
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