![]() |
Routines |
| Prev: D3F0 | Up: Map | Next: D432 |
|
Used by the routine at next_bg_obj_sprite.
The room record starts with a list of background numbers, ended by $FF. Each one is looked up in background_type_tbl to find its list of templates.
|
||||||||||||
| next_bg_obj | D41E | LD A,(HL) | $FF ends the backgrounds and starts the foreground list | |||||||||
| D41F | INC HL | |||||||||||
| D420 | CP $FF | |||||||||||
| D422 | JR Z,find_fg_objs | |||||||||||
| D424 | PUSH BC | look the background up in background_type_tbl; HL = its template list | ||||||||||
| D425 | PUSH HL | |||||||||||
| D426 | LD L,A | |||||||||||
| D427 | LD H,$00 | |||||||||||
| D429 | ADD HL,HL | |||||||||||
| D42A | LD BC,background_type_tbl | |||||||||||
| D42D | ADD HL,BC | |||||||||||
| D42E | LD A,(HL) | |||||||||||
| D42F | INC HL | |||||||||||
| D430 | LD H,(HL) | |||||||||||
| D431 | LD L,A | |||||||||||
| Prev: D3F0 | Up: Map | Next: D432 |