diff options
Diffstat (limited to 'taipan.c')
-rw-r--r-- | taipan.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1290,7 +1290,6 @@ void cash_or_guns(void) // cash = 3500000L; #ifdef BIGNUM big_copy(bank, big1M); - // memcpy(bank, big1M, 6); big_mul(bank, bank, big1M); #else bank = 1000000000L; @@ -1319,13 +1318,18 @@ void cash_or_guns(void) return; } -void set_prices(void) -{ +void set_prices(void) { + char i; + for(i = 0; i < 4; ++i) + price[i] = base_price[i][port] / 2 * (randi()%3 + 1) * base_price[i][0]; + + /* + // using above for loop instead of the below, saves 142 bytes! price[0] = base_price[0][port] / 2 * (randi()%3 + 1) * base_price[0][0]; price[1] = base_price[1][port] / 2 * (randi()%3 + 1) * base_price[1][0]; price[2] = base_price[2][port] / 2 * (randi()%3 + 1) * base_price[2][0]; price[3] = base_price[3][port] / 2 * (randi()%3 + 1) * base_price[3][0]; - return; + */ } |