summaryrefslogtreecommitdiff
path: root/noncore/games/kbill/Game.cc
Unidiff
Diffstat (limited to 'noncore/games/kbill/Game.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kbill/Game.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/games/kbill/Game.cc b/noncore/games/kbill/Game.cc
index 624b50b..4cd5322 100644
--- a/noncore/games/kbill/Game.cc
+++ b/noncore/games/kbill/Game.cc
@@ -58,7 +58,7 @@ void Game::update_info() {
58 ui.draw_str(str, 5, scrheight-5); 58 ui.draw_str(str, 5, scrheight-5);
59 efficiency += ((100*net.base-10*net.win)/net.units); 59 efficiency += ((100*net.base-10*net.win)/net.units);
60} 60}
61 61
62void Game::update_score (int action) { 62void Game::update_score (int action) {
63 switch (action){ 63 switch (action){
64 case ENDLEVEL: score+=(level*efficiency/iteration); break; 64 case ENDLEVEL: score+=(level*efficiency/iteration); break;
@@ -72,7 +72,7 @@ void Game::warp_to_level (unsigned int lev) {
72 setup_level(lev); 72 setup_level(lev);
73 } 73 }
74 else { 74 else {
75 if (lev<=0) return; 75 if (lev <=0) return;
76 start(lev); 76 start(lev);
77 } 77 }
78} 78}
@@ -99,7 +99,7 @@ void Game::button_press(int x, int y) {
99 else if (bill.list[i].state != bill.list[i].STRAY && 99 else if (bill.list[i].state != bill.list[i].STRAY &&
100 bill.list[i].clicked(x, y)) 100 bill.list[i].clicked(x, y))
101 { 101 {
102 if (bill.list[i].state == bill.list[i].AT) 102 if (bill.list[i].state == bill.list[i].AT)
103 net.computers[bill.list[i].target_c].busy=0; 103 net.computers[bill.list[i].target_c].busy=0;
104 bill.list[i].index = -1; 104 bill.list[i].index = -1;
105 bill.list[i].cels = bill.dcels; 105 bill.list[i].cels = bill.dcels;
@@ -131,10 +131,10 @@ void Game::button_release(int x, int y) {
131 && 131 &&
132 net.computers[i].compatible (bill.list[grabbed].cargo) 132 net.computers[i].compatible (bill.list[grabbed].cargo)
133 && 133 &&
134 (net.computers[i].os == OS.WINGDOWS || 134 (net.computers[i].os == OS.WINGDOWS ||
135 net.computers[i].os == OS.OFF)) 135 net.computers[i].os == OS.OFF))
136 { 136 {
137 net.base++; 137 net.base++;
138 if (net.computers[i].os == OS.WINGDOWS) 138 if (net.computers[i].os == OS.WINGDOWS)
139 net.win--; 139 net.win--;
140 else 140 else
@@ -145,12 +145,12 @@ void Game::button_release(int x, int y) {
145 return; 145 return;
146 } 146 }
147 grabbed = EMPTY; 147 grabbed = EMPTY;
148 } 148}
149 149
150void Game::update() { 150void Game::update() {
151 switch (state) { 151 switch (state) {
152 case PLAYING: 152 case PLAYING:
153 ui.clear(); 153 ui.clear();
154 bucket.draw(); 154 bucket.draw();
155 net.update(); 155 net.update();
156 net.draw(); 156 net.draw();