![]()  | 
Routines | 
| Prev: 62009 | Up: Map | Next: 62041 | 
| 
 | 
||||
| 
 
The player wants to throw the food to the bear, check which version of the bear is in the current room.
 
 | 
||||
| Process_ThrowFoodToBear | 62014 | LD A,69 | Call ValidateItemPresent with item 69: "A dead bear". | |
| 62016 | CALL ValidateItemPresent | |||
| 
 
Just to cover all angles, print "Don't be ridiculous." if the player is trying to throw the food to the dead bear...
 
 | 
||||
| 62019 | JP Z,Response_DontBeRidiculous | Jump to Response_DontBeRidiculous if the version of the bear is "A dead bear". | ||
| 
 
The bear is alive, but is the player even carrying the food?
 
 | 
||||
| 62022 | LD A,34 | Call IsPlayerCarryingItem with item 34: "Some food". | ||
| 62024 | CALL IsPlayerCarryingItem | |||
| 
 
The player is carrying the food, so destroy the item.
 
 | 
||||
| 62027 | LD A,E | Call Handler_DestroyItemEvent with the item ID originally passed to the routine. | ||
| 62028 | CALL Handler_DestroyItemEvent | |||
| 
 
The bear has eaten an item so handle the inventory count.
 
 | 
||||
| 62031 | LD HL,42896 | Decrease *Count_InventoryItems by one. | ||
| 62034 | DEC (HL) | |||
| 
 
Print "The bear eats the food.".
 
 | 
||||
| 62035 | LD HL,55063 | HL=Messaging_BearEatsFood. | ||
| 62038 | JP PrintStringAndNewline_Duplicate | Jump to PrintStringAndNewline_Duplicate. | ||
| Prev: 62009 | Up: Map | Next: 62041 |