![]() |
Routines |
| Prev: 37935 | Up: Map | Next: 38025 |
|
Used by the routines at StartGame and HandlerFoodItem.
|
||||||||||||||||||||||||
|
Work out the sprite ID to use.
|
||||||||||||||||||||||||
| PreparePlayer | 37955 | LD A,(24064) | A=GameOptions * 2. | |||||||||||||||||||||
| 37958 | RLCA | |||||||||||||||||||||||
| 37959 | AND %00110000 | Keep only bits 4-5 (the base character address) + 8 frames (for the character direction). | ||||||||||||||||||||||
| 37961 | ADD A,8 | |||||||||||||||||||||||
| 37963 | LD (38024),A | Write A to 38024. | ||||||||||||||||||||||
|
Update the current room.
|
||||||||||||||||||||||||
| 37966 | LD A,(60049) | Write PlayerRoom to 38018. | ||||||||||||||||||||||
| 37969 | LD (38018),A | |||||||||||||||||||||||
| 37972 | LD HL,38017 | Copy 8 bytes of data from 38017 to Player. | ||||||||||||||||||||||
| 37975 | LD DE,60048 | |||||||||||||||||||||||
| 37978 | LD BC,8 | |||||||||||||||||||||||
| 37981 | LDIR | |||||||||||||||||||||||
| 37983 | LD A,104 | |||||||||||||||||||||||
| 37985 | LD (24124),A | |||||||||||||||||||||||
| 37988 | LD A,(24097) | |||||||||||||||||||||||
| 37991 | CP 3 | |||||||||||||||||||||||
| 37993 | JR Z,PreparePlayer_Energy | |||||||||||||||||||||||
| 37995 | PUSH IX | |||||||||||||||||||||||
| 37997 | LD IX,60048 | |||||||||||||||||||||||
| 38001 | CALL DrawEntity | Call DrawEntity. | ||||||||||||||||||||||
| 38004 | POP IX | |||||||||||||||||||||||
|
Set starting energy.
|
||||||||||||||||||||||||
| PreparePlayer_Energy | 38006 | LD A,240 | Write 240 to PlayerEnergy. | |||||||||||||||||||||
| 38008 | LD (24104),A | |||||||||||||||||||||||
| 38011 | CALL DrawChicken | Call DrawChicken. | ||||||||||||||||||||||
| 38014 | JP DrawLives | Jump to DrawLives. | ||||||||||||||||||||||
| 38017 | DEFB 102,0,0,96,104,71,255,0 | |||||||||||||||||||||||
| Prev: 37935 | Up: Map | Next: 38025 |