Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 20 | Rev 21 | ||
|---|---|---|---|
| Line 211... | Line 211... | ||
| 211 | the_powerup = &gPowerup_array[pIndex]; |
211 | the_powerup = &gPowerup_array[pIndex]; |
| 212 | if (the_powerup->type == ePowerup_dummy) { |
212 | if (the_powerup->type == ePowerup_dummy) { |
| 213 | return -1; |
213 | return -1; |
| 214 | } |
214 | } |
| 215 | if (the_powerup->got_proc == NULL) { |
215 | if (the_powerup->got_proc == NULL) { |
| 216 | NewTextHeadupSlot( |
216 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_UNAVAILABLE_IN_DEMO)); |
| 217 | return -1; |
217 | return -1; |
| 218 | } |
218 | } |
| 219 | original_index = pIndex; |
219 | original_index = pIndex; |
| 220 | if (((gProgram_state.sausage_eater_mode || gTotal_peds < 2) |
220 | if (((gProgram_state.sausage_eater_mode || gTotal_peds < 2) |
| 221 | && (strstr(the_powerup->message, "Ped") != NULL |
221 | && (strstr(the_powerup->message, "Ped") != NULL |
| Line 235... | Line 235... | ||
| 235 | s2 = strtok(s, "/"); |
235 | s2 = strtok(s, "/"); |
| 236 | if (gFreeze_timer) { |
236 | if (gFreeze_timer) { |
| 237 | s2 = strtok(NULL, "/"); |
237 | s2 = strtok(NULL, "/"); |
| 238 | } |
238 | } |
| 239 | } |
239 | } |
| 240 | NewTextHeadupSlot( |
240 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, s2); |
| 241 | } |
241 | } |
| 242 | the_powerup->car = pCar; |
242 | the_powerup->car = pCar; |
| 243 | if (the_powerup->got_proc != NULL) { |
243 | if (the_powerup->got_proc != NULL) { |
| 244 | pIndex = the_powerup->got_proc(the_powerup, pCar); |
244 | pIndex = the_powerup->got_proc(the_powerup, pCar); |
| 245 | } |
245 | } |
| Line 587... | Line 587... | ||
| 587 | void ImprovePSPowerup(tCar_spec* pCar, int pIndex) { |
587 | void ImprovePSPowerup(tCar_spec* pCar, int pIndex) { |
| 588 | //tNet_message* the_message; // Pierre-Marie Baty -- unused variable |
588 | //tNet_message* the_message; // Pierre-Marie Baty -- unused variable |
| 589 | LOG_TRACE("(%p, %d)", pCar, pIndex); |
589 | LOG_TRACE("(%p, %d)", pCar, pIndex); |
| 590 | 590 | ||
| 591 | pCar->power_up_levels[pIndex]++; |
591 | pCar->power_up_levels[pIndex]++; |
| 592 | NewTextHeadupSlot( |
592 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_APOGained_START + pIndex)); |
| 593 | } |
593 | } |
| 594 | 594 | ||
| 595 | // IDA: int __usercall GotTimeOrPower@<EAX>(tPowerup *pPowerup@<EAX>, tCar_spec *pCar@<EDX>) |
595 | // IDA: int __usercall GotTimeOrPower@<EAX>(tPowerup *pPowerup@<EAX>, tCar_spec *pCar@<EDX>) |
| 596 | int GotTimeOrPower(tPowerup* pPowerup, tCar_spec* pCar) { |
596 | int GotTimeOrPower(tPowerup* pPowerup, tCar_spec* pCar) { |
| 597 | int time; |
597 | int time; |
| Line 620... | Line 620... | ||
| 620 | ImprovePSPowerup(pCar, index); |
620 | ImprovePSPowerup(pCar, index); |
| 621 | break; |
621 | break; |
| 622 | } |
622 | } |
| 623 | } |
623 | } |
| 624 | } else { |
624 | } else { |
| 625 | NewTextHeadupSlot( |
625 | NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, GetMiscString(kMiscString_YOU_ARE_ALREADY_AT_MAX)); |
| 626 | } |
626 | } |
| 627 | } |
627 | } |
| 628 | return GET_POWERUP_INDEX(pPowerup); |
628 | return GET_POWERUP_INDEX(pPowerup); |
| 629 | } |
629 | } |
| 630 | 630 | ||