| Gyruss | Routines |
| Prev: 8E9D | Up: Map | Next: 8F55 |
|
Used by the routine at create_mines.
|
||||||||||||||
| create_mine | 8F0F | PUSH BC | Save color | |||||||||||
| 8F10 | LD BC,$0009 | Advance IY to mine background data | ||||||||||||
| 8F13 | ADD IY,BC | ... | ||||||||||||
| 8F15 | LD (IY+$04),L | Patterns address LSB | ||||||||||||
| 8F18 | LD (IY+$05),H | Patterns address MSB | ||||||||||||
| 8F1B | LD (IY+$07),D | Polar y | ||||||||||||
| 8F1E | LD (IY+$08),E | Polar x | ||||||||||||
| 8F21 | CALL polar_to_screen | Polar to screen | ||||||||||||
| 8F24 | LD A,D | Screen y | ||||||||||||
| 8F25 | SUB $04 | Screen y - 4 | ||||||||||||
| 8F27 | LD (IY+$01),A | Save in structure | ||||||||||||
| 8F2A | LD A,E | Screen x | ||||||||||||
| 8F2B | SUB $04 | Screen x - 4 | ||||||||||||
| 8F2D | LD (IY+$00),A | Save in structure | ||||||||||||
| 8F30 | LD A,(mine_name) | Get name | ||||||||||||
| 8F33 | RRA | Divide by 8 | ||||||||||||
| 8F34 | RRA | ... | ||||||||||||
| 8F35 | RRA | ... | ||||||||||||
| 8F36 | AND $1F | Mod 32 | ||||||||||||
| 8F38 | LD L,A | HL = color set | ||||||||||||
| 8F39 | LD H,$00 | ... | ||||||||||||
| 8F3B | LD DE,$2000 | Color table | ||||||||||||
| 8F3E | ADD HL,DE | Add color set offset | ||||||||||||
| 8F3F | LD DE,$0002 | Update 2 color sets | ||||||||||||
| 8F42 | POP BC | Restore color | ||||||||||||
| 8F43 | LD A,C | A = color | ||||||||||||
| 8F44 | CALL $1F82 | FILL_VRAM | ||||||||||||
| 8F47 | LD A,(mine_name) | Get name | ||||||||||||
| 8F4A | LD (IY+$06),A | Save in structure | ||||||||||||
| 8F4D | ADD A,$10 | Add 16 (when will this be used?) | ||||||||||||
| 8F4F | LD (mine_name),A | Set name | ||||||||||||
| 8F52 | JP display_background_patterns | Display background patterns | ||||||||||||
| Prev: 8E9D | Up: Map | Next: 8F55 |